Changeset 8f85180 in network-game for server


Ignore:
Timestamp:
Feb 24, 2013, 12:09:43 AM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
ca44f82
Parents:
66906aa
Message:

Added a method for measuring milliseconds and implemented smooth player movement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    r66906aa r8f85180  
    77#include <cstring>
    88#include <cmath>
    9 #include <sys/time.h>
    109
    1110#include <vector>
     
    124123   set_nonblock(sock);
    125124
    126    /*
    127    Player testP;
    128    clock_gettime(CLOCK_REALTIME, &testP.timeLastUpdated);
    129 
    130    cout << "Before sleep" << endl;
    131    // wait some time
    132    sleep(3);
    133    cout << "After sleep" << endl;
    134 
    135    cout << "Loc before: (" << testP.pos.x << ", " << testP.pos.y << ")" << endl;
    136 
    137    testP.move();
    138 
    139    cout << "Loc after: (" << testP.pos.x << ", " << testP.pos.y << ")" << endl;
    140    */
    141 
    142125   bool broadcastResponse;
    143126   while (true) {
Note: See TracChangeset for help on using the changeset viewer.