Phobos-developers / Phobos

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

Weapon range finding in cylinder #1345

Open TaranDahl opened 3 months ago

TaranDahl commented 3 months ago

Range finding in cylinder

In rulesmd.ini:

[General]                         ; WeaponType
AlwaysCylinderRangefinding=false  ; boolean

[SOMEWEAPON]                      ; WeaponType
AlwaysCylinderRangefinding=       ; boolean
TaranDahl commented 3 months ago

Todo:

  1. check if there is any Phobos function that has its own range-finding impl.
  2. check if GuardRange is checked in spherical.
  3. check if MouseOverCell and MouseOverObject is checked in spherical. I was working on the DamageArea-related works last day and found that Phobos has its own cellspread function for some effects. Need to check if this is happening on weapon range finding.
TaranDahl commented 3 months ago

Perhaps we don't need to add an Always to the tag name. CylinderRangefinding would be clear enough I think

Changed.

TaranDahl commented 3 months ago

Looks fine logically. Also, can be named UseCylinderRangefinding for weapontypes

Renamed to CylinderRangefinding

TaranDahl commented 2 months ago

Only handles the vanilla weapon rangefinding, at least for now. Other rangefinding operations should be considered later, if necessary.