Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3618 in orxonox.OLD for orxonox/trunk/src/world_entities/player.cc


Ignore:
Timestamp:
Mar 21, 2005, 3:26:26 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: adding TestGun to implement a test gun :) some smaller changes in ghe weapon.h interface. some doxytags for primitive

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/player.cc

    r3608 r3618  
    192192void Player::fire()
    193193{
    194   if(this->bFire)
     194  if( this->bFire)
    195195    {
    196196      if(this->activeWeapon != NULL)
    197197        this->activeWeapon->fire();
    198198    }
    199   if(this->bWeaponChange)
     199  if( this->bWeaponChange && this->weapons->getSize() > 1)
    200200    {
    201       Weapon* w = this->weapons->enumerate();
     201      PRINTF(1)("changing the weapon of the player: deactivate old, activate new\n");
     202      this->activeWeapon->deactivate();
     203      this->weapons->enumerate();
    202204      this->activeWeapon = this->weapons->nextElement(this->activeWeapon);
     205      this->activeWeapon->activate();
    203206    }
    204207}
Note: See TracChangeset for help on using the changeset viewer.