Changeset 2800 for code/branches/gui/src/network
- Timestamp:
- Mar 19, 2009, 10:34:54 AM (16 years ago)
- Location:
- code/branches/gui/src/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/network/Client.cc
r2773 r2800 45 45 #include "Host.h" 46 46 #include "synchronisable/Synchronisable.h" 47 #include "core/Clock.h" 47 48 #include "core/CoreIncludes.h" 48 49 #include "packet/Packet.h" … … 138 139 * @param time 139 140 */ 140 void Client:: tick(floattime){141 void Client::update(const Clock& time){ 141 142 // COUT(3) << "."; 142 143 if(client_connection.isConnected() && isSynched_){ -
code/branches/gui/src/network/Client.h
r2773 r2800 76 76 //bool sendChat(packet::Chat *chat); 77 77 78 void tick(floattime);78 void update(const Clock& time); 79 79 80 80 private: -
code/branches/gui/src/network/Server.cc
r2773 r2800 51 51 #include "ClientInformation.h" 52 52 #include "util/Sleep.h" 53 #include "core/Clock.h" 53 54 #include "core/ConsoleCommand.h" 54 55 #include "core/CoreIncludes.h" … … 149 150 * @param time time since last tick 150 151 */ 151 void Server:: tick(floattime) {152 void Server::update(const Clock& time) { 152 153 processQueue(); 153 154 //this steers our network frequency 154 timeSinceLastUpdate_+=time ;155 timeSinceLastUpdate_+=time.getDeltaTime(); 155 156 if(timeSinceLastUpdate_>=NETWORK_PERIOD){ 156 157 timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD; -
code/branches/gui/src/network/Server.h
r2662 r2800 71 71 bool processChat(const std::string& message, unsigned int playerID); 72 72 bool queuePacket(ENetPacket *packet, int clientID); 73 void tick(floattime);73 void update(const Clock& time); 74 74 unsigned int getPing(unsigned int clientID); 75 75 double getPacketLoss(unsigned int clientID);
Note: See TracChangeset
for help on using the changeset viewer.