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
figure out if there are any other behaviour differences. IIRC the unit may align its body rotation for onlyForward that it won't with a turret. Whatever is found, document those.
add any missing functionality to turreted weapons.
if/when onlyForward functionality is a subset of what other tags already provide, deprecate (short-term) and remove (long-term).
The
turret = false
weapon def (known in internals asonlyForward
), makes a unit only shoot forward in a cone defined by thetolerance
weapon def (maxForwardAngleDif
internally).At a glance this sounds the same as being a
turret = true
weapon withmaxAngleDif
being equivalent totolerance
(except better because defined in degrees instead of the legacy 16 bit angular unit) and withmainDir
being hardcoded to0 0 1
(i.e. forward).The task is to
The goal is to reduce def duplication.