Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10924


Ignore:
Timestamp:
Dec 7, 2015, 9:04:38 AM (8 years ago)
Author:
gania
Message:

checking in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc

    r10923 r10924  
    173173            }
    174174            maneuverCounter_ += dt;
    175 
     175        if (!this || !this->getControllableEntity())
     176            return;
    176177        //maneuver every 0.25 sec ->
    177         int step =  5;
    178         if (this->hasTarget() && ActionpointController::sTicks_ % 100 == step * (this->actionpointControllerId_) + 3)
     178        int step =  4;
     179        if (this->hasTarget() && ActionpointController::sTicks_ % 100 == step * (this->actionpointControllerId_))
     180        {
     181           
     182        }
     183        if (ActionpointController::sTicks_ % 100 == step * this->actionpointControllerId_ + 1)
     184        {
     185            this->action();
     186        }
     187        if (!this || !this->getControllableEntity())
     188            return;
     189
     190       
     191        if (this->hasTarget() &&  ActionpointController::sTicks_ % ActionpointController::nextActionpointControllerId_ == (this->actionpointControllerId_))
    179192        {
    180193            if (maneuverCounter_ > 6.0f)
     
    185198                this->timeDodged_ = 0;
    186199            }
     200            if (!this || !this->getControllableEntity())
     201            return;
    187202            this->maneuver();
    188         }
    189         if (ActionpointController::sTicks_ % 100 == step * this->actionpointControllerId_ + 1)
    190         {
    191             this->action();
    192         }
    193         if (!this || !this->getControllableEntity())
    194             return;
    195 
    196         if (!this || !this->getControllableEntity())
    197             return;
    198         if (this->hasTarget() &&  ActionpointController::sTicks_ % 100 == step * (this->actionpointControllerId_))
    199         {
     203            if (!this || !this->getControllableEntity())
     204            return;
    200205            this->bShooting_ = this->canFire();
    201            
    202206        }
    203207        if (!this || !this->getControllableEntity())
Note: See TracChangeset for help on using the changeset viewer.