Changeset 11d21ee in network-game for common/Player.cpp


Ignore:
Timestamp:
Jun 9, 2013, 9:30:32 PM (13 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
ff2133a
Parents:
8c74150
Message:

When a player tries to attack someone, they will now move toward the target until they are in range and then start the actual attack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/Player.cpp

    r8c74150 r11d21ee  
    1717   this->timeLastUpdated = 0;
    1818   this->timeAttackStarted = 0;
     19   this->isChasing = false;
    1920   this->isAttacking = false;
    2021
     
    2425   this->attackType = ATTACK_NONE;
    2526   this->damage = 0;
     27   this->range = 0;
    2628   this->attackCooldown = 0;
    2729   this->team = 0;   // blue team by default
     
    4244   this->timeLastUpdated = p.timeLastUpdated;
    4345   this->timeAttackStarted = p.timeAttackStarted;
     46   this->isChasing = p.isChasing;
    4447   this->isAttacking = p.isAttacking;
    4548
     
    4952   this->attackType = p.attackType;
    5053   this->damage = p.damage;
     54   this->range = p.range;
    5155   this->attackCooldown = p.attackCooldown;
    5256   this->team = p.team;
     
    6569   this->timeLastUpdated = 0;
    6670   this->timeAttackStarted = 0;
     71   this->isChasing = false;
    6772   this->isAttacking = false;
    6873
     
    7277   this->attackType = ATTACK_NONE;
    7378   this->damage = 0;
     79   this->range = 0;
    7480   this->attackCooldown = 0;
    7581   this->team = 0;   // blue team by default
     
    100106         this->attackType = ATTACK_MELEE;
    101107         this->damage = 10;
     108         this->range = 30;
    102109         this->attackCooldown = 800;
    103110         break;
     
    107114         this->attackType = ATTACK_RANGED;
    108115         this->damage = 6;
     116         this->range = 100;
    109117         this->attackCooldown = 1000;
    110118         break;
Note: See TracChangeset for help on using the changeset viewer.