Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2009, 5:42:50 PM (15 years ago)
Author:
landauf
Message:

Cleaned up setPlayer/removePlayer interface between PlayerInfo and ControllableEntity. The whole control is now up to the PlayerInfo, the respective functions in ControllableEntity are now protected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/gametypes/Gametype.cc

    r3033 r3038  
    130130            {
    131131                ControllableEntity* oldentity = it->first->getControllableEntity();
    132        
     132
    133133                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(oldentity->getCreator());
    134134                if (oldentity->getCamera())
     
    143143                }
    144144
    145                 it->first->stopControl(oldentity, true);
    146145                it->first->startControl(entity);
    147146            }
     
    421420
    422421    void Gametype::addTime(float t)
    423     { 
     422    {
    424423        if (this->timeLimit_ == 0)
    425424          this->time_ -= t;
     
    429428
    430429    void Gametype::removeTime(float t)
    431     { 
     430    {
    432431        if (this->timeLimit_ == 0)
    433432          this->time_ += t;
     
    437436
    438437    void Gametype::resetTimer()
    439     { 
     438    {
    440439        this->resetTimer(timeLimit_);
    441440    }
    442441
    443442    void Gametype::resetTimer(float t)
    444     { 
     443    {
    445444        this->timeLimit_ = t;
    446445        this->time_ = t;
Note: See TracChangeset for help on using the changeset viewer.