Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7068


Ignore:
Timestamp:
May 31, 2010, 7:11:25 PM (14 years ago)
Author:
ebeier
Message:

bot's won't shoot invisible players anymore!

Location:
code/branches/ppspickups4/src/orxonox/controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ppspickups4/src/orxonox/controllers/AIController.cc

    r6998 r7068  
    3333#include "core/Executor.h"
    3434#include "worldentities/ControllableEntity.h"
     35#include "worldentities/pawns/Pawn.h"
    3536
    3637namespace orxonox
     
    103104
    104105        if (this->target_)
     106            if (!this->target_->getRadarVisibility()) /* So AI won't shoot invisible Spaceships */
     107                this->forgetTarget();
    105108            this->aimAtTarget();
    106109
  • code/branches/ppspickups4/src/orxonox/controllers/ArtificialController.cc

    r6502 r7068  
    111111        {
    112112            if (ArtificialController::sameTeam(this->getControllableEntity(), static_cast<ControllableEntity*>(*it), this->getGametype()))
     113                continue;
     114
     115            /* So AI won't choose invisible Spaceships as target */
     116            if (!it->getRadarVisibility())
    113117                continue;
    114118
Note: See TracChangeset for help on using the changeset viewer.