Changeset e6c26b8 in network-game for common/Player.cpp
- Timestamp:
- Oct 1, 2013, 8:08:24 PM (12 years ago)
- Branches:
- master
- Children:
- 95ffe57
- Parents:
- 373089e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Player.cpp
r373089e re6c26b8 206 206 } 207 207 208 bool Player::updateTarget(map<unsigned int, Player >& mapPlayers) {208 bool Player::updateTarget(map<unsigned int, Player*>& mapPlayers) { 209 209 if (this->isChasing) { 210 this->target.x = mapPlayers[this->targetPlayer] .pos.x;211 this->target.y = mapPlayers[this->targetPlayer] .pos.y;210 this->target.x = mapPlayers[this->targetPlayer]->pos.x; 211 this->target.y = mapPlayers[this->targetPlayer]->pos.y; 212 212 213 213 if (posDistance(this->pos, this->target.toFloat()) <= this->range) {
Note:
See TracChangeset
for help on using the changeset viewer.