Changeset 8dad966 in network-game for common/Player.cpp
- Timestamp:
- Jun 3, 2013, 11:05:20 PM (12 years ago)
- Branches:
- master
- Children:
- d03ec0f
- Parents:
- 8a4ed74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Player.cpp
r8a4ed74 r8dad966 16 16 this->pos.y = this->target.y = 0; 17 17 this->timeLastUpdated = 0; 18 this->timeAttackStarted = 0; 19 this->isAttacking = false; 18 20 19 21 this->playerClass = CLASS_NONE; … … 22 24 this->attackType = ATTACK_NONE; 23 25 this->damage = 0; 26 this->attackCooldown = 0; 24 27 this->team = 0; // blue team by default 25 28 this->hasBlueFlag = false; … … 38 41 this->target.y = p.target.y; 39 42 this->timeLastUpdated = p.timeLastUpdated; 43 this->timeAttackStarted = p.timeAttackStarted; 44 this->isAttacking = p.isAttacking; 40 45 41 46 this->playerClass = p.playerClass; … … 44 49 this->attackType = p.attackType; 45 50 this->damage = p.damage; 51 this->attackCooldown = p.attackCooldown; 46 52 this->team = p.team; 47 53 this->hasBlueFlag = p.hasBlueFlag; … … 57 63 this->pos.x = this->target.x = 200; 58 64 this->pos.y = this->target.y = 200; 65 this->timeLastUpdated = 0; 66 this->timeAttackStarted = 0; 67 this->isAttacking = false; 59 68 60 69 this->playerClass = CLASS_NONE; … … 63 72 this->attackType = ATTACK_NONE; 64 73 this->damage = 0; 74 this->attackCooldown = 0; 65 75 this->team = 0; // blue team by default 66 76 this->hasBlueFlag = false; … … 87 97 case CLASS_WARRIOR: 88 98 this->playerClass = CLASS_WARRIOR; 89 this->maxHealth = this->health = 1 00;99 this->maxHealth = this->health = 120; 90 100 this->attackType = ATTACK_MELEE; 91 101 this->damage = 10; 102 this->attackCooldown = 800; 92 103 break; 93 104 case CLASS_RANGER: … … 96 107 this->attackType = ATTACK_RANGED; 97 108 this->damage = 6; 109 this->attackCooldown = 1000; 98 110 break; 99 111 case CLASS_NONE:
Note:
See TracChangeset
for help on using the changeset viewer.