Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 21, 2016, 1:59:04 PM (8 years ago)
Author:
muemart
Message:

Fix some clang-tidy warnings.
Also, Serialise.h was doing some C-style casts that ended up being const casts. I moved those const casts as close to the source as possible and changed the loadAndIncrease functions to not do that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/controllers/FightingController.cc

    r11071 r11083  
    5858    void FightingController::lookAtTarget(float dt)
    5959    {
    60         if (!this || !this->getControllableEntity())
     60        if (!this->getControllableEntity())
    6161            return;
    6262        ControllableEntity* entity = this->getControllableEntity();
     
    124124        Vector3 diffUnit = diffVector/diffLength;
    125125
    126         if (!this || !this->getControllableEntity())
    127             return;
    128 
    129126        //too far? well, come closer then
    130127        if (diffLength > this->attackRange_)
     
    142139            this->bKeepFormation_ = false;
    143140
    144             if (!this || !this->getControllableEntity())
    145                 return;
    146141            if (!this->bDodge_)
    147142            {
     
    217212    float FightingController::squaredDistanceToTarget()  const
    218213    {
    219         if (!this || !this->getControllableEntity())
     214        if (!this->getControllableEntity())
    220215            return 0;
    221216        if (!this->target_ || !this->getControllableEntity())
     
    237232    Pawn* FightingController::closestTarget() const
    238233    {
    239         if (!this || !this->getControllableEntity())
     234        if (!this->getControllableEntity())
    240235            return nullptr;
    241236
Note: See TracChangeset for help on using the changeset viewer.