Changeset 3038 for code/trunk/src/orxonox/objects/worldentities
- Timestamp:
- May 24, 2009, 5:42:50 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/objects/worldentities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
r2973 r3038 91 91 92 92 if (this->getPlayer() && this->getPlayer()->getControllableEntity() == this) 93 this->getPlayer()->stopControl( this, false);93 this->getPlayer()->stopControl(); 94 94 95 95 if (this->hud_) -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h
r2973 r3038 39 39 class _OrxonoxExport ControllableEntity : public MobileEntity 40 40 { 41 friend class PlayerInfo; // PlayerInfo uses setPlayer and removePlayer 42 41 43 public: 42 44 ControllableEntity(BaseObject* creator); … … 50 52 virtual void changedPlayer() {} 51 53 52 virtual void setPlayer(PlayerInfo* player);53 virtual void removePlayer();54 54 inline PlayerInfo* getPlayer() const 55 55 { return this->player_; } … … 131 131 132 132 protected: 133 virtual void setPlayer(PlayerInfo* player); // don't call this directly, use friend class PlayerInfo instead 134 virtual void removePlayer(); // don't call this directly, use friend class PlayerInfo instead 135 133 136 virtual void startLocalHumanControl(); 134 137 virtual void stopLocalHumanControl(); -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r3033 r3038 209 209 this->getGametype()->pawnKilled(this, this->lastHitOriginator_); 210 210 211 if (this->getPlayer() )212 this->getPlayer()->stopControl( this);211 if (this->getPlayer() && this->getPlayer()->getControllableEntity() == this) 212 this->getPlayer()->stopControl(); 213 213 214 214 if (GameMode::isMaster()) -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
r2826 r3038 47 47 virtual void tick(float dt); 48 48 void registerVariables(); 49 50 virtual void setPlayer(PlayerInfo* player);51 virtual void removePlayer();52 49 53 50 inline bool isAlive() const … … 113 110 114 111 protected: 112 virtual void setPlayer(PlayerInfo* player); 113 virtual void removePlayer(); 114 115 115 virtual void death(); 116 116 virtual void deatheffect(); -
code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.h
r2662 r3038 46 46 virtual void tick(float dt); 47 47 48 virtual void setPlayer(PlayerInfo* player);49 virtual void startLocalHumanControl();50 51 48 virtual void moveFrontBack(const Vector2& value); 52 49 virtual void moveRightLeft(const Vector2& value); … … 59 56 virtual void fire(WeaponMode::Enum fireMode); 60 57 virtual void greet(); 58 59 protected: 60 virtual void setPlayer(PlayerInfo* player); 61 virtual void startLocalHumanControl(); 61 62 62 63 private:
Note: See TracChangeset
for help on using the changeset viewer.