refactor entities events
This commit is contained in:
@@ -165,7 +165,7 @@ void Entities::despawn(entityid_t id) {
|
||||
auto& eid = entity->getID();
|
||||
if (!eid.destroyFlag) {
|
||||
eid.destroyFlag = true;
|
||||
scripting::on_entity_despawn(entity->getDef(), *entity);
|
||||
scripting::on_entity_despawn(*entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,15 @@
|
||||
#include <entt/entity/registry.hpp>
|
||||
|
||||
struct entity_funcs_set {
|
||||
bool init : 1;
|
||||
bool on_despawn : 1;
|
||||
bool on_grounded : 1;
|
||||
bool on_fall : 1;
|
||||
bool on_sensor_enter : 1;
|
||||
bool on_sensor_exit : 1;
|
||||
bool on_save : 1;
|
||||
bool init;
|
||||
bool on_despawn;
|
||||
bool on_grounded;
|
||||
bool on_fall;
|
||||
bool on_sensor_enter;
|
||||
bool on_sensor_exit;
|
||||
bool on_save;
|
||||
bool on_aim_on;
|
||||
bool on_aim_off;
|
||||
};
|
||||
|
||||
struct EntityDef;
|
||||
|
||||
Reference in New Issue
Block a user