Changeset 6812 for code/branches/dynamicmatch/src/orxonox/controllers
- Timestamp:
- Apr 30, 2010, 4:42:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/dynamicmatch/src/orxonox/controllers/ArtificialController.cc
r6686 r6812 249 249 if (dynamic) 250 250 { 251 if (dynamic->notEnoughPigs||dynamic->notEnoughKillers||dynamic->notEnoughChasers) {return false;} 252 251 253 if (entity1->getPlayer()) 252 254 team1 = dynamic->getParty(entity1->getPlayer()); … … 254 256 if (entity2->getPlayer()) 255 257 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 258 if (team1 ==-1 ||team2 ==-1 ) {return false;} 259 else if (team1 == dynamic->chaser && team2 != dynamic->chaser) {return false;} 260 else if (team1 == dynamic->piggy && team2 == dynamic->chaser) {return false;} 261 else if (team1 == dynamic->killer && team2 == dynamic->chaser) {return false;} 262 else return true; 263 264 } 265 266 return (team1 == team2 && team1 != -1); 267 } 260 268 }
Note: See TracChangeset
for help on using the changeset viewer.