From c4c21d3fb68fac987bd902abc9770670c8aecaa4 Mon Sep 17 00:00:00 2001 From: Lutik Date: Mon, 19 Jul 2010 11:41:24 +0400 Subject: [PATCH] [10226] Fixed GO_JUST_DEACTIVATED for despawned by default gameobject. Signed-off-by: VladimirMangos --- src/game/GameObject.cpp | 8 +------- src/shared/revision_nr.h | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 7387b933f..9ff2d4585 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -417,14 +417,8 @@ void GameObject::Update(uint32 /*p_time*/) if(!m_respawnDelayTime) return; - if(!m_spawnedByDefault) - { - m_respawnTime = 0; - return; - } - // since pool system can fail to roll unspawned object, this one can remain spawned, so must set respawn nevertheless - m_respawnTime = time(NULL) + m_respawnDelayTime; + m_respawnTime = m_spawnedByDefault ? time(NULL) + m_respawnDelayTime : 0; // if option not set then object will be saved at grid unload if(sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATLY)) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d3fe047f0..02bb1c42f 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 "10225" + #define REVISION_NR "10226" #endif // __REVISION_NR_H__