HomeWildfire Games

Fix idle unit not attacking nearest unit.

Description

Fix idle unit not attacking nearest unit.

In rP22475 checking for new targets have been moved to timer to be executed in next turn, but los range updates were not changed, that introduced side-effect, that was overlooked.
If unit in IDLE gets los range update, so potential target enters its range, it will try to attack it. It is ok, if unit took into account all units around before that, what in case timer have not been executed yet, did not happen.

Fixing issue by introducing checks for unit being really idle.

Reported on forum: https://wildfiregames.com/forum/index.php?/topic/27214-borg-expansion-pack-mod-implementation-in-0ad-alpha-24-release/&do=findComment&comment=387987

Patch by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D2422