Changeset 3263 for code/branches
- Timestamp:
- Jul 1, 2009, 10:51:57 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/orxonox/gamestates/GSDedicated.cc
r3240 r3263 85 85 86 86 this->server_ = new Server(CommandLine::getValue("port")); 87 if( this->commandLine_ ) 88 delete[] this->commandLine_; 87 89 COUT(0) << "Loading scene in server mode" << std::endl; 88 90 … … 111 113 { 112 114 timeSinceLastUpdate_ += time.getDeltaTime(); 113 if (timeSinceLastUpdate_ >= NETWORK_PERIOD)115 //if (timeSinceLastUpdate_ >= NETWORK_PERIOD) 114 116 { 115 117 timeSinceLastUpdate_ -= static_cast<unsigned int>(timeSinceLastUpdate_ / NETWORK_PERIOD) * NETWORK_PERIOD; 116 118 server_->update(time); 117 119 } 118 else120 /*else 119 121 { 120 122 msleep(static_cast<unsigned int>((NETWORK_PERIOD - timeSinceLastUpdate_)*1000)); 121 123 msleep(static_cast<unsigned int>(NETWORK_PERIOD*1000)); // NOTE: this is to throttle the non-network framerate 122 124 // COUT(0) << "sleeping for " << (int)((NETWORK_PERIOD - timeSinceLastUpdate_) * 1000 * 1000) << " usec" << endl; 123 } 125 }*/ 124 126 processQueue(); 125 127 printLine(); … … 195 197 std::cout << endl << CommandExecutor::hint( std::string((const char*)this->commandLine_,inputIterator_) ) << endl; 196 198 strncpy((char*)this->commandLine_, CommandExecutor::complete( std::string((const char*)this->commandLine_,inputIterator_) ).c_str(), MAX_COMMAND_LENGTH); 197 inputIterator_ = strlen((const char*)this->commandLine_); 199 this->inputIterator_ = strlen((const char*)this->commandLine_); 200 this->cursorX_ = this->inputIterator_; 198 201 break; 199 202 }
Note: See TracChangeset
for help on using the changeset viewer.