Phobos-developers / Phobos

Ares-compatible C&C Red Alert 2: Yuri's Revenge engine extension
GNU Lesser General Public License v3.0
302 stars 97 forks source link

Targeting Optimizations #1364

Open TaranDahl opened 3 months ago

TaranDahl commented 3 months ago
  1. Technos won't SelectAutoTarget if they are not IsArmed. Didn't check thoroughly, more tests or disassembling are needed.
  2. New flags to customize the scanning delay per techno, and differently for player and AI. Default to the vanilla flags NormalTargetingDelay and GuardAreaTargetingDelay. As enemy scanning is a costly part of the total overhead, this should be able to improve the performance, especially on the maps with numbers of enemies.
    [General] or [SomeTechno]
    AINormalTargetingDelay=
    PlayerNormalTargetingDelay=
    AIGuardAreaTargetingDelay=
    PlayerGuardAreaTargetingDelay=

    P.S.: The docs are coming, s∞n. image

MortonPL commented 2 months ago

Documentation please image

github-actions[bot] commented 2 months ago

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

TaranDahl commented 2 months ago

Documentation please image

It's here now.

TaranDahl commented 2 months ago

This can be merged after tests.

Some friends in Chinese community tested this. No fatal error, desync, or misbehavior was found. Didn't check for edge cases carefully, though.