Changeset 3280 for code/trunk/src/orxonox/objects/worldentities/pawns
- Timestamp:
- Jul 12, 2009, 11:58:01 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core4 (added) merged: 3235-3237,3245-3250,3253-3254,3260-3261,3265,3270
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r3214 r3280 28 28 29 29 #include "Pawn.h" 30 31 #include <algorithm> 30 32 31 33 #include "core/CoreIncludes.h" … … 117 119 void Pawn::registerVariables() 118 120 { 119 registerVariable(this->bAlive_, variableDirection::toclient);120 registerVariable(this->health_, variableDirection::toclient);121 registerVariable(this->initialHealth_, variableDirection::toclient);122 registerVariable(this->bReload_, variableDirection::toserver);121 registerVariable(this->bAlive_, VariableDirection::ToClient); 122 registerVariable(this->health_, VariableDirection::ToClient); 123 registerVariable(this->initialHealth_, VariableDirection::ToClient); 124 registerVariable(this->bReload_, VariableDirection::ToServer); 123 125 } 124 126 … … 152 154 void Pawn::setHealth(float health) 153 155 { 154 this->health_ = min(health, this->maxHealth_);156 this->health_ = std::min(health, this->maxHealth_); 155 157 } 156 158 -
code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
r3196 r3280 90 90 void SpaceShip::registerVariables() 91 91 { 92 registerVariable(this->primaryThrust_, variableDirection::toclient);93 registerVariable(this->auxilaryThrust_, variableDirection::toclient);94 registerVariable(this->rotationThrust_, variableDirection::toclient);92 registerVariable(this->primaryThrust_, VariableDirection::ToClient); 93 registerVariable(this->auxilaryThrust_, VariableDirection::ToClient); 94 registerVariable(this->rotationThrust_, VariableDirection::ToClient); 95 95 } 96 96 -
code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc
r3196 r3280 93 93 void Spectator::registerVariables() 94 94 { 95 registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));96 registerVariable(this->bGreeting_, variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));95 registerVariable(this->bGreetingFlareVisible_, VariableDirection::ToClient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility)); 96 registerVariable(this->bGreeting_, VariableDirection::ToServer, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting)); 97 97 } 98 98 … … 145 145 ControllableEntity::setPlayer(player); 146 146 147 // this->setObjectMode( objectDirection::toclient);147 // this->setObjectMode(ObjectDirection::ToClient); 148 148 } 149 149 -
code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
r3196 r3280 43 43 RegisterObject(TeamBaseMatchBase); 44 44 45 this->state_ = BaseState:: uncontrolled;45 this->state_ = BaseState::Uncontrolled; 46 46 47 47 TeamBaseMatch* gametype = dynamic_cast<TeamBaseMatch*>(this->getGametype()); … … 66 66 switch (this->state_) 67 67 { 68 case BaseState:: controlTeam1:68 case BaseState::ControlTeam1: 69 69 colour = gametype->getTeamColour(0); 70 70 break; 71 case BaseState:: controlTeam2:71 case BaseState::ControlTeam2: 72 72 colour = gametype->getTeamColour(1); 73 73 break; 74 case BaseState:: uncontrolled:74 case BaseState::Uncontrolled: 75 75 default: 76 76 colour = ColourValue(0.5, 0.5, 0.5, 1.0); -
code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h
r3196 r3280 38 38 namespace BaseState 39 39 { 40 enum Enum40 enum Value 41 41 { 42 uncontrolled,43 controlTeam1,44 controlTeam2,42 Uncontrolled, 43 ControlTeam1, 44 ControlTeam2, 45 45 }; 46 46 } … … 58 58 59 59 // Set the state of a base to whatever the argument of the function is 60 void setState(BaseState:: Enumstate)60 void setState(BaseState::Value state) 61 61 { 62 62 this->state_ = state; … … 66 66 67 67 // Get the state of a base as a return value 68 BaseState:: EnumgetState() const68 BaseState::Value getState() const 69 69 { 70 70 return this->state_; … … 75 75 void changeTeamColour(); 76 76 77 BaseState:: Enumstate_;77 BaseState::Value state_; 78 78 }; 79 79 }
Note: See TracChangeset
for help on using the changeset viewer.