Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 19, 2009, 10:34:54 AM (16 years ago)
Author:
rgrieder
Message:

Renaming "tick" to "update" for all those classes not inheriting from Tickable to avoid confusions.
GameState::ticked still exists, but that's going to change anyway.

Location:
code/branches/gui/src/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/network/Client.cc

    r2773 r2800  
    4545#include "Host.h"
    4646#include "synchronisable/Synchronisable.h"
     47#include "core/Clock.h"
    4748#include "core/CoreIncludes.h"
    4849#include "packet/Packet.h"
     
    138139   * @param time
    139140   */
    140   void Client::tick(float time){
     141  void Client::update(const Clock& time){
    141142//     COUT(3) << ".";
    142143    if(client_connection.isConnected() && isSynched_){
  • code/branches/gui/src/network/Client.h

    r2773 r2800  
    7676    //bool sendChat(packet::Chat *chat);
    7777
    78     void tick(float time);
     78    void update(const Clock& time);
    7979
    8080  private:
  • code/branches/gui/src/network/Server.cc

    r2773 r2800  
    5151#include "ClientInformation.h"
    5252#include "util/Sleep.h"
     53#include "core/Clock.h"
    5354#include "core/ConsoleCommand.h"
    5455#include "core/CoreIncludes.h"
     
    149150  * @param time time since last tick
    150151  */
    151   void Server::tick(float time) {
     152  void Server::update(const Clock& time) {
    152153    processQueue();
    153154    //this steers our network frequency
    154     timeSinceLastUpdate_+=time;
     155    timeSinceLastUpdate_+=time.getDeltaTime();
    155156    if(timeSinceLastUpdate_>=NETWORK_PERIOD){
    156157      timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
  • code/branches/gui/src/network/Server.h

    r2662 r2800  
    7171    bool processChat(const std::string& message, unsigned int playerID);
    7272    bool queuePacket(ENetPacket *packet, int clientID);
    73     void tick(float time);
     73    void update(const Clock& time);
    7474    unsigned int getPing(unsigned int clientID);
    7575    double getPacketLoss(unsigned int clientID);
Note: See TracChangeset for help on using the changeset viewer.