Changeset a72bbde in network-game for server/server.cpp


Ignore:
Timestamp:
May 18, 2013, 7:35:30 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
430c80e
Parents:
876add0
Message:

Removed some unused code for updating player positions server-side (this was uncommented in the last commit)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    r876add0 ra72bbde  
    129129   bool broadcastResponse;
    130130   timespec ts;
    131    long timeLastUpdated = 0, curTime = 0;
     131   long timeLastUpdated = 0, curTime = 0, timeLastBroadcast = 0;
    132132   while (true) {
    133133
     
    189189         }
    190190      }
    191 
    192       // we don't want to update and broadcast player positions here
    193       // when a player sends a position update, we want to check if
    194       // it's reasonable and send it out to all other players
    195 
    196       // update player positions
    197       map<unsigned int, Player>::iterator it;
    198       for (it = mapPlayers.begin(); it != mapPlayers.end(); it++)
    199       {
    200          it->second.move(gameMap);
    201       }
    202 
    203       broadcastPlayerPositions(mapPlayers, sock);
    204191   }
    205192
Note: See TracChangeset for help on using the changeset viewer.