- Timestamp:
- Jan 19, 2014, 8:19:18 PM (11 years ago)
- Branches:
- master
- Children:
- 9ba9b96
- Parents:
- 1f6233e
- Location:
- common
- Files:
-
- 2 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) { -
common/Player.h
r1f6233e rd998572 48 48 void deserialize(char* buffer); 49 49 50 bool updateTarget( map<unsigned int, Player*>& mapPlayers);50 bool updateTarget(const Player* targetPlayer); 51 51 bool move(WorldMap *map); 52 52 void takeDamage(int damage);
Note:
See TracChangeset
for help on using the changeset viewer.