The first line checks the angle against maxFireAngle (which is the internal engine name for what Lua defs call fireTolerance).
The second line looks like it checks the same angle against an arbitrary 20° angle.
This sounds like it would mean setting firetolerance above 20° does nothing because any angle larger than 20° is caught anyway by the hardcoded check.
The task is to:
verify that the description above matches reality
get rid of the hardcoded check
I don't see a reason to cap fireTolerance, especially since the default is already supposed to match the hardcoded check. But if you discover a good reason the check was there then put an explicit maximum on fireTolerance in WeaponDef.cpp.
https://github.com/beyond-all-reason/spring/blob/e55ce6231a0b125f41f56688277dca95ddc7b3bd/rts/Sim/Weapons/Weapon.cpp#L371-L372
The first line checks the angle against
maxFireAngle
(which is the internal engine name for what Lua defs callfireTolerance
). The second line looks like it checks the same angle against an arbitrary 20° angle. This sounds like it would mean setting firetolerance above 20° does nothing because any angle larger than 20° is caught anyway by the hardcoded check.The task is to:
fireTolerance
, especially since the default is already supposed to match the hardcoded check. But if you discover a good reason the check was there then put an explicit maximum onfireTolerance
inWeaponDef.cpp
.