Changeset 126 for trunk/src/game/ObjectAccessor.cpp
- Timestamp:
- 11/19/08 13:38:32 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/ObjectAccessor.cpp
r120 r126 534 534 std::set<WorldObject *> activeobjects(i_activeobjects); 535 535 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); 540 545 } 541 546