2025-08-11 22:23 CEST

spring: develop 810ae78c Diff ] Back to Repository ]
Author Committer Branch Timestamp Parent
Tobi Vollebregt Tobi Vollebregt develop 2009-10-29 22:24:22 develop 6267dd4f
Changeset Fixed mismatch between CMobileCAI::IsValidTarget and CGameHelper::GetClosestEnemyUnit.

Introduced CGameHelper::GetClosestValidTarget, that uses (virtual) call
to CMobileCAI::IsValidTarget to determine whether the target is valid.

This fixes bugs with idle/fighting/patrolling units not attacking nearby
enemies when there are closer enemy units which are invalid targets.

(Due to unit->neutral, noChaseCategory, hasUwWeapons, etc.)
mod - rts/Game/GameHelper.cpp Diff ] File ]
mod - rts/Game/GameHelper.h Diff ] File ]
mod - rts/Sim/Units/CommandAI/AirCAI.cpp Diff ] File ]
mod - rts/Sim/Units/CommandAI/AirCAI.h Diff ] File ]
mod - rts/Sim/Units/CommandAI/MobileCAI.cpp Diff ] File ]
mod - rts/Sim/Units/CommandAI/MobileCAI.h Diff ] File ]