Changeset 3257 for code/branches/core4/src/orxonox/objects/gametypes
- Timestamp:
- Jun 30, 2009, 3:14:45 PM (15 years ago)
- Location:
- code/branches/core4/src/orxonox/objects/gametypes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/orxonox/objects/gametypes/Gametype.h
r3196 r3257 45 45 namespace PlayerState 46 46 { 47 enum Enum47 enum Value 48 48 { 49 49 Uninitialized, … … 57 57 { 58 58 PlayerInfo* info_; 59 PlayerState:: Enumstate_;59 PlayerState::Value state_; 60 60 int frags_; 61 61 int killed_; -
code/branches/core4/src/orxonox/objects/gametypes/TeamBaseMatch.cc
r3239 r3257 66 66 if (teamnr == 0) 67 67 { 68 base->setState(BaseState:: controlTeam1);68 base->setState(BaseState::ControlTeam1); 69 69 this->gtinfo_.sendAnnounceMessage("The red team captured a base"); 70 70 } 71 71 if (teamnr == 1) 72 72 { 73 base->setState(BaseState:: controlTeam2);73 base->setState(BaseState::ControlTeam2); 74 74 this->gtinfo_.sendAnnounceMessage("The blue team captured a base"); 75 75 } … … 107 107 switch (base->getState()) 108 108 { 109 case BaseState:: controlTeam1:109 case BaseState::ControlTeam1: 110 110 teamnrbase = 0; 111 111 break; 112 case BaseState:: controlTeam2:112 case BaseState::ControlTeam2: 113 113 teamnrbase = 1; 114 114 break; 115 case BaseState:: uncontrolled:115 case BaseState::Uncontrolled: 116 116 default: 117 117 teamnrbase = -1; … … 155 155 for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it) 156 156 { 157 if((*it)->getState() == BaseState:: controlTeam1)157 if((*it)->getState() == BaseState::ControlTeam1) 158 158 { 159 159 amountControlled++; 160 160 } 161 if((*it)->getState() == BaseState:: controlTeam2)161 if((*it)->getState() == BaseState::ControlTeam2) 162 162 { 163 163 amountControlled2++; … … 241 241 for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it) 242 242 { 243 if ((*it)->getState() == BaseState:: controlTeam1 && team == 0)243 if ((*it)->getState() == BaseState::ControlTeam1 && team == 0) 244 244 count++; 245 if ((*it)->getState() == BaseState:: controlTeam2 && team == 1)245 if ((*it)->getState() == BaseState::ControlTeam2 && team == 1) 246 246 count++; 247 247 } … … 253 253 { 254 254 this->bases_.insert(base); 255 base->setState(BaseState:: uncontrolled);255 base->setState(BaseState::Uncontrolled); 256 256 } 257 257
Note: See TracChangeset
for help on using the changeset viewer.