Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6920 in orxonox.OLD for trunk/src/world_entities/weapons/turret.cc


Ignore:
Timestamp:
Jan 31, 2006, 10:37:09 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: default target for turret and other weapons, that support targetting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/turret.cc

    r6759 r6920  
    118118
    119119  Quaternion quat;
    120   Vector direction = this->getAbsCoor();/*this->getWeaponManager()->getFixedTarget()->getAbsCoor() - this->getAbsCoor();*/
     120  Vector direction;
     121  if (this->getDefaultTarget() == NULL)
     122    direction = this->getAbsCoor();
     123  else
     124    direction = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor();
    121125
    122126  direction.normalize();
Note: See TracChangeset for help on using the changeset viewer.