Show
Ignore:
Timestamp:
11/19/08 13:38:32 (17 years ago)
Author:
yumileroy
Message:

[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.

Original author: w12x
Date: 2008-10-27 15:28:04-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/ObjectAccessor.cpp

    r120 r126  
    534534        std::set<WorldObject *> activeobjects(i_activeobjects); 
    535535 
    536         std::set<WorldObject *>::const_iterator itr; 
    537         for(itr = activeobjects.begin(); itr != activeobjects.end(); ++itr) 
    538         { 
    539             (*itr)->GetMap()->resetMarkedCells(); 
     536        std::set<WorldObject *>::iterator itr, next; 
     537        for(itr = activeobjects.begin(); itr != activeobjects.end(); itr = next) 
     538        { 
     539            next = itr; 
     540            ++next; 
     541            if((*itr)->IsInWorld()) 
     542                (*itr)->GetMap()->resetMarkedCells(); 
     543            else 
     544                activeobjects.erase(itr); 
    540545        } 
    541546