Changeset 3289 for code/branches/netp6/src/orxonox/gamestates
- Timestamp:
- Jul 14, 2009, 10:09:12 AM (15 years ago)
- Location:
- code/branches/netp6/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/orxonox/gamestates/GSDedicated.cc
r3284 r3289 58 58 : GameState(name) 59 59 , server_(0) 60 , timeSinceLastUpdate_(0)61 60 , closeThread_(false) 62 61 , cleanLine_(true) … … 109 108 void GSDedicated::update(const Clock& time) 110 109 { 111 timeSinceLastUpdate_ += time.getDeltaTime(); 112 //if (timeSinceLastUpdate_ >= NETWORK_PERIOD) 113 { 114 timeSinceLastUpdate_ -= static_cast<unsigned int>(timeSinceLastUpdate_ / NETWORK_PERIOD) * NETWORK_PERIOD; 115 server_->update(time); 116 } 117 /*else 118 { 119 msleep(static_cast<unsigned int>((NETWORK_PERIOD - timeSinceLastUpdate_)*1000)); 120 msleep(static_cast<unsigned int>(NETWORK_PERIOD*1000)); // NOTE: this is to throttle the non-network framerate 121 // COUT(0) << "sleeping for " << (int)((NETWORK_PERIOD - timeSinceLastUpdate_) * 1000 * 1000) << " usec" << endl; 122 }*/ 110 server_->update(time); 123 111 processQueue(); 124 112 printLine(); -
code/branches/netp6/src/orxonox/gamestates/GSDedicated.h
r3198 r3289 66 66 67 67 Server* server_; 68 float timeSinceLastUpdate_;69 68 70 69 boost::thread *inputThread_;
Note: See TracChangeset
for help on using the changeset viewer.