mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-11 04:28:41 +01:00
[svn] * Fixed startup error flood if creature model id is 0
* Fixed totems using proper model ids broken after recent change * Set pet grid activity state to that of caster upon summoning * Fix a possible crash in ObjectAccessor note to self: don't commit anything without 3 days testing. ever. after this one ofc. --HG-- branch : trunk
This commit is contained in:
@@ -533,10 +533,15 @@ ObjectAccessor::Update(uint32 diff)
|
||||
// clone the active object list, because update might remove from it
|
||||
std::set<WorldObject *> activeobjects(i_activeobjects);
|
||||
|
||||
std::set<WorldObject *>::const_iterator itr;
|
||||
for(itr = activeobjects.begin(); itr != activeobjects.end(); ++itr)
|
||||
std::set<WorldObject *>::iterator itr, next;
|
||||
for(itr = activeobjects.begin(); itr != activeobjects.end(); itr = next)
|
||||
{
|
||||
(*itr)->GetMap()->resetMarkedCells();
|
||||
next = itr;
|
||||
++next;
|
||||
if((*itr)->IsInWorld())
|
||||
(*itr)->GetMap()->resetMarkedCells();
|
||||
else
|
||||
activeobjects.erase(itr);
|
||||
}
|
||||
|
||||
Map *map;
|
||||
|
||||
Reference in New Issue
Block a user