Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 21, 2006, 1:27:29 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the SpaceShipControl branche back to the trunk

merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/spaceshipcontrol . -r6482:HEAD

minor conflicts, and added file hover.cc/h to the Makefile.

File:
1 edited

Legend:

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

    r6512 r6637  
    9292  this->target = new Aim(this);
    9393  this->target->setVisibility(false);
    94 
     94  this->target->setRange(100);
     95  this->target->setAngle(M_PI_4/2);
     96  this->lockedTime = 0;
     97  this->neededLockTime = 2;
     98  this->lockedTarget->setParent(PNode::getNullParent());
    9599  this->loadModel("models/guns/turret2.obj");
    96100
     
    119123void TargetingTurret::tick(float dt)
    120124{
     125  if( lockedTime >= neededLockTime )
     126   {
     127    lockedTarget = this->target->getParent();
     128    lockedTime = 0;
     129   }
    121130
    122131  this->target->tick(dt);
     132
     133  if(this->target->getParent() == PNode::getNullParent())
     134   lockedTime = 0;
     135  else
     136   lockedTime += dt;
     137
    123138}
    124139
     
    137152  pj->setAbsDir(this->getAbsDir());
    138153  pj->activate();
    139   this->target->searchTarget(100);
     154  this->target->searchTarget();
    140155}
    141156
Note: See TracChangeset for help on using the changeset viewer.