Changeset d998572 in network-game for common/Player.cpp
- Timestamp:
- Jan 19, 2014, 8:19:18 PM (11 years ago)
- Branches:
- master
- Children:
- 9ba9b96
- Parents:
- 1f6233e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Player.cpp
r1f6233e rd998572 217 217 } 218 218 219 bool Player::updateTarget( map<unsigned int, Player*>& mapPlayers) {219 bool Player::updateTarget(const Player* targetPlayer) { 220 220 if (this->isChasing) { 221 this->target.x = mapPlayers[this->targetPlayer]->pos.x;222 this->target.y = mapPlayers[this->targetPlayer]->pos.y;221 this->target.x = targetPlayer->pos.x; 222 this->target.y = targetPlayer->pos.y; 223 223 224 224 if (posDistance(this->pos, this->target.toFloat()) <= this->range) {
Note:
See TracChangeset
for help on using the changeset viewer.