Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 16, 2015, 4:24:41 PM (10 years ago)
Author:
erbj
Message:

added timer in tick function to pause for 10 seconds between waves , trying to solve the problem, that towers are shooting at (0,0,0) (center point). The Problem seems to be in the sameteam function as the turret and the pawn at the position (0,0,0) should have the same team

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/towerdefenseFS15/src/modules/objects/controllers/TurretController.cc

    r10262 r10368  
    104104        {
    105105            Pawn* entity = orxonox_cast<Pawn*>(*it);
    106             if (!entity || FormationController::sameTeam(this->getControllableEntity(), entity, this->getGametype()))
     106            if (!entity || FormationController::sameTeam(turret, entity, this->getGametype()))
    107107                continue;
    108108            tempScore = turret->isInRange(entity);
     
    196196            if(this->isLookingAtTargetNew(Degree(5).valueRadians()))
    197197            {
     198                orxout() << target_->getIdentifier()->getName() << " / " << target_->getWorldPosition() << " / " << target_->getHealth() << " / " << target_->getTeam() << " / " << this->getTeam() << " / " << turret->getTeam() << endl;
     199                if (target_->getController())
     200                        orxout() << target_->getController()->getIdentifier()->getName() << " / " << target_->getController()->getTeam() << endl;
    198201                this->getControllableEntity()->fire(0);
    199202            }
Note: See TracChangeset for help on using the changeset viewer.