Core/Scripting: Fixed hotswap calling evade mode for dead creatures

This commit is contained in:
sirikfoll
2017-01-13 14:24:26 -03:00
committed by Keader
parent 8a6c3e03cd
commit afa8527338

View File

@@ -378,7 +378,8 @@ class CreatureGameObjectScriptRegistrySwapHooks
ASSERT(!creature->IsCharmed(),
"There is a disabled AI which is still loaded.");
creature->AI()->EnterEvadeMode();
if (creature->IsAlive())
creature->AI()->EnterEvadeMode();
}
static void UnloadDestroyScript(Creature* creature)