From fc5da8a7bf72748d86e0cef024680b7290edb000 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 4 Apr 2009 14:09:44 -0600 Subject: *Add check in ClearUpdateMask. --HG-- branch : trunk --- src/game/Object.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game/Object.cpp b/src/game/Object.cpp index b19a80fc7bf..5efc7553574 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -747,6 +747,15 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask void Object::ClearUpdateMask(bool remove) { + if(!m_uint32Values_mirror || !m_uint32Values) + { + sLog.outCrash("Object::ClearUpdateMask: Object entry %u (type %u) does not have uint32Values", GetEntry(), GetTypeId()); + return; + } + + assert(m_uint32Values[0]); + assert(m_uint32Values_mirror[0]); + for( uint16 index = 0; index < m_valuesCount; index ++ ) { if(m_uint32Values_mirror[index]!= m_uint32Values[index]) @@ -797,7 +806,7 @@ void Object::_SetUpdateBits(UpdateMask *updateMask, Player* /*target*/) const { if(!m_uint32Values_mirror || !m_uint32Values) { - sLog.outCrash("Object entry %u (type %u) does not have uint32Values", GetEntry(), GetTypeId()); + sLog.outCrash("Object::_SetUpdateBits: Object entry %u (type %u) does not have uint32Values", GetEntry(), GetTypeId()); return; } -- cgit v1.2.3