beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
210 stars 100 forks source link

`onlyForward` may be redundant #1449

Open sprunk opened 5 months ago

sprunk commented 5 months ago

The turret = false weapon def (known in internals as onlyForward), makes a unit only shoot forward in a cone defined by the tolerance weapon def (maxForwardAngleDif internally).

At a glance this sounds the same as being a turret = true weapon with maxAngleDif being equivalent to tolerance (except better because defined in degrees instead of the legacy 16 bit angular unit) and with mainDir being hardcoded to 0 0 1 (i.e. forward).

The task is to

The goal is to reduce def duplication.