Changeset 66c4ec4 in network-game for server/server.cpp
- Timestamp:
- Jun 19, 2013, 11:46:30 PM (11 years ago)
- Branches:
- master
- Children:
- 5a5f131
- Parents:
- c76134b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
rc76134b r66c4ec4 176 176 177 177 it->second.pos = spawnPos.toFloat(); 178 it->second.target = spawnPos; 179 it->second.health = it->second.maxHealth; 178 180 179 181 serverMsg.type = MSG_TYPE_PLAYER; … … 209 211 bool broadcastMove = false; 210 212 for (it = mapPlayers.begin(); it != mapPlayers.end(); it++) { 211 cout << "Starting new for loop iteration" << endl;212 213 oldPos = it->second.pos; 213 214 if (it->second.move(gameMap)) { … … 440 441 } 441 442 442 cout << "Done with the for loop" << endl;443 444 443 // move all projectiles 445 cout << "Moving projectiles" << endl;446 444 map<unsigned int, Projectile>::iterator itProj; 447 445 for (itProj = mapProjectiles.begin(); itProj != mapProjectiles.end(); itProj++) { … … 481 479 } 482 480 } 483 cout << "Done moving projectiles" << endl;484 481 485 482 n = receiveMessage(&clientMsg, sock, &from); … … 904 901 p->health = 0; 905 902 if (p->health == 0) { 903 cout << "Player died" << endl; 906 904 p->isDead = true; 907 905 p->timeDied = getCurrentMillis();
Note:
See TracChangeset
for help on using the changeset viewer.