MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / validTeamTarget

Method validTeamTarget

src/clientbase/Player.cpp:1093–1106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1091
1092
1093bool Player::validTeamTarget(const Player* possibleTarget) const {
1094 TeamColor myTeam = getTeam();
1095 TeamColor targetTeam = possibleTarget->getTeam();
1096 if (myTeam != targetTeam) {
1097 return true;
1098 }
1099
1100 if (myTeam != RogueTeam) {
1101 return false;
1102 }
1103
1104 World* world = World::getWorld();
1105 return (world && !world->allowRabbit());
1106}
1107
1108
1109void Player::renderRadar() const {

Callers 4

getTargetPriorityMethod · 0.80
findBestTargetFunction · 0.80
fireAtTankFunction · 0.80
executeMethod · 0.80

Calls 2

allowRabbitMethod · 0.80
getTeamMethod · 0.45

Tested by

no test coverage detected