Changeset 6686 for code/branches/dynamicmatch/src/orxonox/controllers
- Timestamp:
- Apr 12, 2010, 2:52:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/dynamicmatch/src/orxonox/controllers/ArtificialController.cc
r6502 r6686 34 34 #include "worldentities/pawns/TeamBaseMatchBase.h" 35 35 #include "gametypes/TeamDeathmatch.h" 36 #include "gametypes/Dynamicmatch.h" 36 37 #include "controllers/WaypointPatrolController.h" 38 37 39 38 40 namespace orxonox … … 244 246 } 245 247 } 246 247 return (team1 == team2 && team1 != -1); 248 } 248 Dynamicmatch* dynamic = orxonox_cast<Dynamicmatch*>(gametype); 249 if (dynamic) 250 { 251 if (entity1->getPlayer()) 252 team1 = dynamic->getParty(entity1->getPlayer()); 253 254 if (entity2->getPlayer()) 255 team2 = dynamic->getParty(entity2->getPlayer()); 256 } 257 258 return (team1 == team2 && team1 != -1)&&(!dynamic->onlyChasers); //returns false if players are in the same party and there is a victim 259 } //-> if there is no victim or the AI-Player is not in the same team the AI attacks 249 260 }
Note: See TracChangeset
for help on using the changeset viewer.