Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6164 for code


Ignore:
Timestamp:
Nov 26, 2009, 5:31:16 PM (15 years ago)
Author:
landauf
Message:

bots now also hit their target

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/controllers/ArtificialController.cc

    r5929 r6164  
    143143        this->targetPosition_ = getPredictedPosition(this->getControllableEntity()->getPosition(), hardcoded_projectile_speed, this->target_->getPosition(), this->target_->getVelocity());
    144144        this->bHasTargetPosition_ = (this->targetPosition_ != Vector3::ZERO);
     145       
     146        Pawn* pawn = dynamic_cast<Pawn*>(this->getControllableEntity());
     147        if (pawn)
     148            pawn->setAimPosition(this->targetPosition_);
    145149    }
    146150
Note: See TracChangeset for help on using the changeset viewer.