Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 18, 2011, 6:52:21 PM (13 years ago)
Author:
jo
Message:

Pawn&SpaceShip Colouring via XML works. Quick&Dirty implementation though. A clean version is going to follow.

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

Legend:

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

    r8923 r8942  
    4242#include "gametypes/TeamDeathmatch.h"
    4343#include "gametypes/Dynamicmatch.h"
     44#include "gametypes/Mission.h"
    4445#include "controllers/WaypointPatrolController.h"
    4546#include "controllers/NewHumanController.h"
     
    996997            if (entity2->getPlayer())
    997998                team2 = tdm->getTeam(entity2->getPlayer());
     999        }
     1000
     1001        Mission* miss = orxonox_cast<Mission*>(gametype);
     1002        if (miss)
     1003        {
     1004            if (entity1->getPlayer())
     1005                team1 = miss->getTeam(entity1->getPlayer());
     1006
     1007            if (entity2->getPlayer())
     1008                team2 = miss->getTeam(entity2->getPlayer());
    9981009        }
    9991010
  • code/branches/gamecontent/src/orxonox/controllers/HumanController.cc

    r8858 r8942  
    195195            this->boosting_ = true;
    196196            this->boostingTimeout_.startTimer();
    197            
    198             this->controllableEntity_->boost(this->boosting_);
     197            if(this->controllableEntity_)
     198                this->controllableEntity_->boost(this->boosting_);
    199199//            orxout() << "Start boosting" << endl;
    200200        }
     
    209209        this->boosting_ = false;
    210210        this->boostingTimeout_.stopTimer();
    211 
    212         this->controllableEntity_->boost(this->boosting_);
     211        if(this->controllableEntity_)
     212            this->controllableEntity_->boost(this->boosting_);
    213213//        orxout() << "Stop boosting" << endl;
    214214    }
Note: See TracChangeset for help on using the changeset viewer.