Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 14, 2011, 8:24:00 PM (13 years ago)
Author:
landauf
Message:

hack-fix: overridden implementations of stopLocalHumanControl() were not called in multiplayer, which caused the "fire" command to not reset in Spectator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/worldentities/ControllableEntity.cc

    r7860 r7889  
    9696            this->bDestroyWhenPlayerLeft_ = false;
    9797
    98             if (this->bHasLocalController_ && this->bHasHumanController_)
    99                 this->stopLocalHumanControl();
    100 
    10198            if (this->getPlayer() && this->getPlayer()->getControllableEntity() == this)
    10299                this->getPlayer()->stopControl();
     
    133130    {
    134131        SetConfigValue(mouseLookSpeed_, 3.0f);
     132    }
     133
     134    void ControllableEntity::preDestroy()
     135    {
     136        // HACK - solve this clean and without preDestroy hook for multiplayer where removePlayer() isn't called
     137        if (this->bHasLocalController_ && this->bHasHumanController_)
     138            this->stopLocalHumanControl();
    135139    }
    136140
Note: See TracChangeset for help on using the changeset viewer.