diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 5f856275e7e..a0fc8f8c674 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -456,7 +456,8 @@ void Creature::Update(uint32 update_diff, uint32 diff) SetDeathState( JUST_ALIVED ); //Call AI respawn virtual function - i_AI->JustRespawned(); + if (AI()) + AI()->JustRespawned(); GetMap()->Add(this); } @@ -529,10 +530,13 @@ void Creature::Update(uint32 update_diff, uint32 diff) if(!IsInEvadeMode()) { - // do not allow the AI to be changed during update - m_AI_locked = true; - i_AI->UpdateAI(diff); // AI not react good at real update delays (while freeze in non-active part of map) - m_AI_locked = false; + if (AI()) + { + // do not allow the AI to be changed during update + m_AI_locked = true; + AI()->UpdateAI(diff); // AI not react good at real update delays (while freeze in non-active part of map) + m_AI_locked = false; + } } // creature can be dead after UpdateAI call diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b89b58357c5..dceff2aa0c6 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10926" + #define REVISION_NR "10927" #endif // __REVISION_NR_H__