Changeset 1502 for code/trunk/src/orxonox/tools
- Timestamp:
- Jun 1, 2008, 3:54:20 PM (17 years ago)
- Location:
- code/trunk/src/orxonox/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/tools/Mesh.cc
r1056 r1502 40 40 unsigned int Mesh::meshCounter_s = 0; 41 41 42 Mesh::Mesh() 42 Mesh::Mesh() : 43 entity_(0) 43 44 { 44 this->entity_ = 0;45 45 } 46 46 -
code/trunk/src/orxonox/tools/Timer.cc
r1293 r1502 27 27 */ 28 28 29 #include <set> 30 29 31 #include "OrxonoxStableHeaders.h" 30 32 #include "Timer.h" … … 37 39 namespace orxonox 38 40 { 39 ConsoleCommandShortcutExtern(delay, AccessLevel::None); 41 SetConsoleCommandShortcutExtern(delay); 42 SetConsoleCommandShortcutExtern(killdelays); 43 44 static std::set<StaticTimer*> delaytimerset; 40 45 41 46 /** … … 47 52 { 48 53 StaticTimer *delaytimer = new StaticTimer(); 54 delaytimerset.insert(delaytimer); 55 49 56 ExecutorStatic* delayexecutor = createExecutor(createFunctor(&executeDelayedCommand)); 50 57 delayexecutor->setDefaultValues(delaytimer, command); … … 61 68 CommandExecutor::execute(command); 62 69 delete timer; 70 delaytimerset.erase(timer); 71 } 72 73 /** 74 @brief Kills all delayed commands. 75 */ 76 void killdelays() 77 { 78 for (std::set<StaticTimer*>::iterator it = delaytimerset.begin(); it != delaytimerset.end(); ++it) 79 delete (*it); 80 81 delaytimerset.clear(); 63 82 } 64 83 -
code/trunk/src/orxonox/tools/Timer.h
r1056 r1502 69 69 class StaticTimer; 70 70 void delay(float delay, const std::string& command); 71 void killdelays(); 71 72 void executeDelayedCommand(StaticTimer* timer, const std::string& command); 72 73
Note: See TracChangeset
for help on using the changeset viewer.