- Timestamp:
- Jun 18, 2013, 11:16:21 PM (12 years ago)
- Branches:
- master
- Children:
- 66c4ec4
- Parents:
- 1d0ede1
- Location:
- common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Player.cpp
r1d0ede1 rc76134b 17 17 this->timeLastUpdated = 0; 18 18 this->timeAttackStarted = 0; 19 this->timeDied = 0; 19 20 this->isChasing = false; 20 21 this->isAttacking = false; 22 this->isDead = false; 21 23 22 24 this->playerClass = CLASS_NONE; … … 44 46 this->timeLastUpdated = p.timeLastUpdated; 45 47 this->timeAttackStarted = p.timeAttackStarted; 48 this->timeDied = p.timeDied; 46 49 this->isChasing = p.isChasing; 47 50 this->isAttacking = p.isAttacking; 51 this->isDead = p.isDead; 48 52 49 53 this->playerClass = p.playerClass; … … 69 73 this->timeLastUpdated = 0; 70 74 this->timeAttackStarted = 0; 75 this->timeDied = 0; 71 76 this->isChasing = false; 72 77 this->isAttacking = false; 78 this->isDead = false; 73 79 74 80 this->playerClass = CLASS_NONE; -
common/Player.h
r1d0ede1 rc76134b 61 61 unsigned long long timeLastUpdated; 62 62 unsigned long long timeAttackStarted; 63 unsigned long long timeDied; 63 64 bool isChasing; 64 65 bool isAttacking; 65 66 int targetPlayer; 67 bool isDead; 66 68 67 69 int playerClass; -
common/Projectile.cpp
r1d0ede1 rc76134b 74 74 // if the current target logs off, this method will run into problems 75 75 76 //cout << "Inside projectile move" << endl;76 cout << "Inside projectile move" << endl; 77 77 78 78 unsigned long long curTime = getCurrentMillis(); 79 cout << "Got current time" << endl; 80 79 81 Player targetP = mapPlayers[target]; 82 cout << "Got target" << endl; 80 83 81 84 if (timeLastUpdated == 0) { … … 89 92 float dist = sqrt(pow(targetP.pos.x-pos.x, 2) + pow(targetP.pos.y-pos.y, 2)); 90 93 91 //cout << "About to finish projectile move" << endl;94 cout << "About to finish projectile move" << endl; 92 95 93 96 if (dist <= pixels) {
Note:
See TracChangeset
for help on using the changeset viewer.