Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6435 in orxonox.OLD for trunk


Ignore:
Timestamp:
Jan 8, 2006, 2:08:24 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: weapon tick is now the only tick functions of Weapon.
If someone wants to extend the tick function of Weapon, he has to
Weapon::tick(dt)
it.

Location:
trunk/src/world_entities
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/ground_turret.cc

    r6433 r6435  
    115115  if (likely(this->left != NULL))
    116116  {
    117     this->left->tickW(dt);
     117    this->left->tick(dt);
    118118    this->left->requestAction(WA_SHOOT);
    119119  }
    120120  if (likely(this->right != NULL))
    121121  {
    122     this->right->tickW(dt);
     122    this->right->tick(dt);
    123123    this->right->requestAction(WA_SHOOT);
    124124  }
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r6434 r6435  
    118118void AimingTurret::tick(float dt)
    119119{
     120  Weapon::tick(dt);
     121
    120122  Quaternion quat;
    121123  Vector direction = this->target->getAbsCoor() - this->getAbsCoor();
  • trunk/src/world_entities/weapons/targeting_turret.cc

    r6434 r6435  
    119119void TargetingTurret::tick(float dt)
    120120{
     121  Weapon::tick(dt);
    121122
    122123  this->target->tick(dt);
  • trunk/src/world_entities/weapons/turret.cc

    r6434 r6435  
    128128void Turret::tick(float dt)
    129129{
     130  Weapon::tick(dt);
    130131  Quaternion quat;
    131132  Vector direction = this->getAbsCoor();/*this->getWeaponManager()->getFixedTarget()->getAbsCoor() - this->getAbsCoor();*/
  • trunk/src/world_entities/weapons/weapon.cc

    r6434 r6435  
    507507 * tick signal for time dependent/driven stuff
    508508*/
    509 void Weapon::tickW(float dt)
     509void Weapon::tick(float dt)
    510510{
    511511  //printf("%s ", stateToChar(this->currentState));
     
    530530    }
    531531  }
    532   tick(dt);
    533532}
    534533
  • trunk/src/world_entities/weapons/weapon.h

    r6306 r6435  
    149149
    150150    // FLOW
    151     void tickW(float dt); //!< this is a function that must be called by the weaponManager, or any other weaponHandler, all other functions are handled from within
    152 
    153     virtual void tick(float dt) {};
     151    void tick(float dt); //!< this is a function that must be called by the weaponManager, or any other weaponHandler, all other functions are handled from within
    154152
    155153    bool check() const;
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r6142 r6435  
    389389
    390390    if( tickWeapon != NULL && tickWeapon->isActive())
    391       tickWeapon->tickW(dt);
     391      tickWeapon->tick(dt);
    392392  }
    393393
Note: See TracChangeset for help on using the changeset viewer.