Changeset 66906aa in network-game for server


Ignore:
Timestamp:
Feb 18, 2013, 7:58:06 PM (12 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
8f85180
Parents:
f401cac
Message:

The server should now smoothly move players to their targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    rf401cac r66906aa  
    124124   set_nonblock(sock);
    125125
     126   /*
    126127   Player testP;
    127128   clock_gettime(CLOCK_REALTIME, &testP.timeLastUpdated);
     
    137138
    138139   cout << "Loc after: (" << testP.pos.x << ", " << testP.pos.y << ")" << endl;
    139 
    140 /*
     140   */
     141
    141142   bool broadcastResponse;
    142143   while (true) {
     
    160161
    161162            map<unsigned int, Player>::iterator it;
    162 
    163163            for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
    164164            {
     
    175175         }
    176176
     177         // update player positions
     178         map<unsigned int, Player>::iterator it;
     179         for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
     180         {
     181            it->second.move();
     182         }
     183
    177184         broadcastPlayerPositions(mapPlayers, sock);
    178185      }
    179186   }
    180 */
    181187
    182188   return 0;
Note: See TracChangeset for help on using the changeset viewer.