- Timestamp:
- Nov 26, 2009, 2:11:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/gamestates/GSRoot.cc
r6105 r6160 45 45 GSRoot::GSRoot(const GameStateInfo& info) 46 46 : GameState(info) 47 , timeFactor_(1.0f)48 47 , bPaused_(false) 49 48 , timeFactorPauseBackup_(1.0f) … … 73 72 { 74 73 // reset game speed to normal 75 this->timeFactor_ = 1.0f;74 TimeFactorListener::setTimeFactor(1.0f); 76 75 77 76 // time factor console command … … 102 101 } 103 102 for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; ) 104 (it++)->tick(leveldt * this->timeFactor_);103 (it++)->tick(leveldt * TimeFactorListener::getTimeFactor()); 105 104 /*** HACK *** HACK ***/ 106 105 } … … 119 118 if (!this->bPaused_) 120 119 { 121 TimeFactorListener::timefactor_s = factor; 122 123 for (ObjectList<TimeFactorListener>::iterator it = ObjectList<TimeFactorListener>::begin(); it != ObjectList<TimeFactorListener>::end(); ++it) 124 it->changedTimeFactor(factor, this->timeFactor_); 125 126 this->timeFactor_ = factor; 120 TimeFactorListener::setTimeFactor(factor); 127 121 } 128 122 else … … 137 131 if (!this->bPaused_) 138 132 { 139 this->timeFactorPauseBackup_ = this->timeFactor_;133 this->timeFactorPauseBackup_ = TimeFactorListener::getTimeFactor(); 140 134 this->setTimeFactor(0.0f); 141 135 this->bPaused_ = true; … … 148 142 } 149 143 } 144 145 float GSRoot::getTimeFactor() 146 { 147 return TimeFactorListener::getTimeFactor(); 148 } 150 149 }
Note: See TracChangeset
for help on using the changeset viewer.