Optimization of pathfinding when clearing fog/shroud.
(bitwise operation don't do short-circuit evaluation, and the useless call was the most expensive operation of this loop) We can add this to the list:"Performance are often killed by compilable 1-character typo" (in fact, I commit this change separately just for that ;p ).
This commit is contained in:
parent
5fd5c96505
commit
90451b8e2c
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ static void find_routes(const gamemap& map, const gamestatus& status,
|
|||
--new_turns_left;
|
||||
new_move_left = u.total_movement() - move_cost;
|
||||
}
|
||||
const bool skirmisher = force_ignore_zocs | u.get_ability_bool("skirmisher",currentloc);
|
||||
const bool skirmisher = force_ignore_zocs || u.get_ability_bool("skirmisher",currentloc);
|
||||
const bool zoc = !skirmisher && enemy_zoc(map,units,teams,currentloc, viewing_team,u.side(),see_all);
|
||||
|
||||
const int zoc_move_left = zoc ? 0 : new_move_left;
|
||||
|
|
Loading…
Add table
Reference in a new issue