Changeset 7889 for code/trunk
- Timestamp:
- Feb 14, 2011, 8:24:00 PM (14 years ago)
- Location:
- code/trunk/src/orxonox/worldentities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/ControllableEntity.cc
r7860 r7889 96 96 this->bDestroyWhenPlayerLeft_ = false; 97 97 98 if (this->bHasLocalController_ && this->bHasHumanController_)99 this->stopLocalHumanControl();100 101 98 if (this->getPlayer() && this->getPlayer()->getControllableEntity() == this) 102 99 this->getPlayer()->stopControl(); … … 133 130 { 134 131 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(); 135 139 } 136 140 -
code/trunk/src/orxonox/worldentities/ControllableEntity.h
r7533 r7889 157 157 158 158 protected: 159 virtual void preDestroy(); 160 159 161 virtual void setPlayer(PlayerInfo* player); // don't call this directly, use friend class PlayerInfo instead 160 162 virtual void removePlayer(); // don't call this directly, use friend class PlayerInfo instead -
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
r7533 r7889 145 145 } 146 146 147 void Pawn::preDestroy() 148 { 149 // yay, multiple inheritance! 150 this->ControllableEntity::preDestroy(); 151 this->PickupCarrier::preDestroy(); 152 } 153 147 154 void Pawn::setPlayer(PlayerInfo* player) 148 155 { -
code/trunk/src/orxonox/worldentities/pawns/Pawn.h
r7655 r7889 132 132 133 133 protected: 134 virtual void preDestroy(); 135 134 136 virtual void setPlayer(PlayerInfo* player); 135 137 virtual void removePlayer();
Note: See TracChangeset
for help on using the changeset viewer.