Changeset 3086 for code/trunk/src/orxonox/objects/controllers
- Timestamp:
- May 27, 2009, 1:44:48 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/controllers/ArtificialController.cc
r3049 r3086 36 36 #include "objects/gametypes/TeamDeathmatch.h" 37 37 #include "objects/controllers/WaypointPatrolController.h" 38 #include "objects/worldentities/pawns/TeamBaseMatchBase.h" 38 39 39 40 namespace orxonox … … 203 204 } 204 205 206 TeamBaseMatchBase* base = 0; 207 base = dynamic_cast<TeamBaseMatchBase*>(entity1); 208 if (base) 209 { 210 switch (base->getState()) 211 { 212 case BaseState::controlTeam1: 213 team1 = 0; 214 break; 215 case BaseState::controlTeam2: 216 team1 = 1; 217 break; 218 case BaseState::uncontrolled: 219 default: 220 team1 = -1; 221 } 222 } 223 base = dynamic_cast<TeamBaseMatchBase*>(entity2); 224 if (base) 225 { 226 switch (base->getState()) 227 { 228 case BaseState::controlTeam1: 229 team2 = 0; 230 break; 231 case BaseState::controlTeam2: 232 team2 = 1; 233 break; 234 case BaseState::uncontrolled: 235 default: 236 team2 = -1; 237 } 238 } 239 205 240 return (team1 == team2 && team1 != -1); 206 241 }
Note: See TracChangeset
for help on using the changeset viewer.