Changeset 64a1f4e in network-game for common/Game.cpp
- Timestamp:
- Jan 29, 2014, 2:06:36 AM (11 years ago)
- Branches:
- master
- Children:
- 8826eed
- Parents:
- d6b5f74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Game.cpp
rd6b5f74 r64a1f4e 3 3 #include <iostream> 4 4 #include <cstring> 5 #include <cstdlib> 5 6 6 7 #include "Common.h" … … 45 46 if (players.find(p->getId()) == players.end()) { 46 47 players[p->getId()] = p; 48 49 // reset player stats, location, etc. 50 p->pos.x = p->target.x = 200; 51 p->pos.y = p->target.y = 200; 52 p->setTargetPlayer(0); 53 p->isChasing = false; 54 p->isAttacking = false; 55 p->isDead = false; 56 p->health = p->maxHealth; 57 p->hasBlueFlag = false; 58 p->hasRedFlag = false; 59 60 // choose a random team (either 0 or 1) 61 p->team = rand() % 2; 62 63 p->currentGame = this; 64 47 65 return true; 48 66 }
Note:
See TracChangeset
for help on using the changeset viewer.