diff --git a/entities/ai/entity_ai.cpp b/entities/ai/entity_ai.cpp index 679baea..fefb37c 100644 --- a/entities/ai/entity_ai.cpp +++ b/entities/ai/entity_ai.cpp @@ -10,6 +10,9 @@ void EntityAI::set_enabled(bool value) { } void EntityAI::set_owner(Entity *entity) { + if (entity == _owner) + return; + _owner = entity; call("_on_set_owner");