Changeset 11071 for code/trunk/src/orxonox/gamestates/GSRoot.cc
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (8 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/gamestates/GSRoot.cc
r10624 r11071 34 34 #include "core/GameMode.h" 35 35 #include "core/command/ConsoleCommandIncludes.h" 36 #include "core/object/ObjectList.h" 36 37 #include "network/NetworkFunctionIncludes.h" 37 38 #include "tools/Timer.h" … … 73 74 { 74 75 unsigned int nr=0; 75 for ( ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; ++it)76 { 77 Synchronisable* synchronisable = orxonox_cast<Synchronisable*>( *it);76 for (BaseObject* baseObject : ObjectList<BaseObject>()) 77 { 78 Synchronisable* synchronisable = orxonox_cast<Synchronisable*>(baseObject); 78 79 if (synchronisable) 79 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << " id: " << synchronisable->getObjectID() << endl;80 orxout(debug_output) << "object: " << baseObject->getIdentifier()->getName() << " id: " << synchronisable->getObjectID() << endl; 80 81 else 81 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl;82 orxout(debug_output) << "object: " << baseObject->getIdentifier()->getName() << endl; 82 83 nr++; 83 84 } … … 98 99 void GSRoot::deactivate() 99 100 { 100 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject( 0);101 ModifyConsoleCommand(__CC_getTimeFactor_name).setObject( 0);102 ModifyConsoleCommand(__CC_setPause_name).setObject( 0);103 ModifyConsoleCommand(__CC_pause_name).setObject( 0);101 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(nullptr); 102 ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(nullptr); 103 ModifyConsoleCommand(__CC_setPause_name).setObject(nullptr); 104 ModifyConsoleCommand(__CC_pause_name).setObject(nullptr); 104 105 } 105 106 … … 112 113 } 113 114 114 for (ObjectList<Timer>::iterator it = ObjectList<Timer>::begin(); it; ) 115 ObjectList<Timer> listTimer; 116 for (ObjectList<Timer>::iterator it = listTimer.begin(); it; ) 115 117 { 116 118 Timer* object = *it; … … 128 130 } 129 131 float realdt = leveldt * TimeFactorListener::getTimeFactor(); 130 for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ) 132 ObjectList<Tickable> listTickable; 133 for (ObjectList<Tickable>::iterator it = listTickable.begin(); it; ) 131 134 { 132 135 Tickable* object = *it;
Note: See TracChangeset
for help on using the changeset viewer.