Person::players[k]->hasvictim = 0;
if (Person::players.size() > 1) {
for (unsigned i = 0; i < Person::players.size(); i++) {
- if (i == k || !(k == 0 || i == 0)) {
+ if (i == k ||
+ (Person::players[k]->isPlayerTeam() && Person::players[i]->isPlayerTeam()) ||
+ !(Person::players[k]->isPlayerTeam() || Person::players[i]->isPlayerTeam())) {
continue;
}
if (!Person::players[k]->hasvictim) {
bool hasWeapon() { return (weaponactive != -1); }
bool isPlayerControlled() { return (aitype == playercontrolled); }
bool isPlayerFriend() { return isplayerfriend; }
+ bool isPlayerTeam() { return isPlayerControlled() || isPlayerFriend(); }
};
const int maxplayers = 10;