Changeset 1629 for code/branches/input/src/network
- Timestamp:
- Jun 27, 2008, 8:07:29 AM (17 years ago)
- Location:
- code/branches/input/src/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/input/src/network/GameStateClient.cc
r1534 r1629 34 34 #include "core/BaseObject.h" 35 35 #include "Synchronisable.h" 36 #include "objects/SpaceShip.h" 36 37 37 38 -
code/branches/input/src/network/GameStateClient.h
r1505 r1629 44 44 // 45 45 #include "NetworkPrereqs.h" 46 #include "OrxonoxPrereqs.h" 46 47 #include "core/CorePrereqs.h" 47 48 #include "PacketTypes.h" 48 #include " objects/SpaceShip.h"49 #include "Synchronisable.h" 49 50 50 51 51 52 #define GAMESTATEID_INITIAL -1 53 52 54 53 55 namespace network -
code/branches/input/src/network/Server.cc
r1534 r1629 181 181 timeSinceLastUpdate_+=time; 182 182 if(timeSinceLastUpdate_>=(1./NETWORK_FREQUENCY)){ 183 timeSinceLastUpdate_-=(1./NETWORK_FREQUENCY); 183 timeSinceLastUpdate_=(float)((int)(timeSinceLastUpdate_*NETWORK_FREQUENCY))/timeSinceLastUpdate_; 184 // timeSinceLastUpdate_-=1./NETWORK_FREQUENCY; 184 185 gamestates->processGameStates(); 185 186 updateGamestate(); 186 187 } 188 /*while(timeSinceLastUpdate_>1./NETWORK_FREQUENCY) 189 timeSinceLastUpdate_-=1./NETWORK_FREQUENCY;*/ 187 190 // usleep(5000); // TODO remove 188 191 return; … … 217 220 COUT(3) << "Server: could not elaborate" << std::endl; 218 221 } 222 break; 223 default: 219 224 break; 220 225 }
Note: See TracChangeset
for help on using the changeset viewer.