- Timestamp:
- May 18, 2013, 7:35:30 PM (12 years ago)
- Branches:
- master
- Children:
- 430c80e
- Parents:
- 876add0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
r876add0 ra72bbde 129 129 bool broadcastResponse; 130 130 timespec ts; 131 long timeLastUpdated = 0, curTime = 0 ;131 long timeLastUpdated = 0, curTime = 0, timeLastBroadcast = 0; 132 132 while (true) { 133 133 … … 189 189 } 190 190 } 191 192 // we don't want to update and broadcast player positions here193 // when a player sends a position update, we want to check if194 // it's reasonable and send it out to all other players195 196 // update player positions197 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);204 191 } 205 192
Note:
See TracChangeset
for help on using the changeset viewer.