Skip to content

Commit

Permalink
Abilities: Revert an unintentional change of the behavior of affect_a…
Browse files Browse the repository at this point in the history
…llies.

Fixes #4257
  • Loading branch information
jostephd committed Oct 1, 2019
1 parent 9384d3b commit c72f1dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/units/abilities.cpp
Expand Up @@ -131,11 +131,12 @@ bool affects_side(const config& cfg, std::size_t side, std::size_t other_side)
// display::get_singleton() has already been confirmed valid by both callers.
const team& side_team = display::get_singleton()->get_disp_context().get_team(side);

if(side == other_side || !side_team.is_enemy(other_side)) {
if(side == other_side)
return cfg["affect_allies"].to_bool(true);
} else {
if(side_team.is_enemy(other_side))
return cfg["affect_enemies"].to_bool();
}
else
return cfg["affect_allies"].to_bool();
}

}
Expand Down

0 comments on commit c72f1dc

Please sign in to comment.