New aim mode for A_CustomRailgun that doesn't force pitch

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: New aim mode for A_CustomRailgun that doesn't force pitch

New aim mode for A_CustomRailgun that doesn't force pitch

by Jekyll Grim Payne » Thu Dec 16, 2021 8:27 am

Currently A_CustomRailgun includes a pretty silly oversight where it *always* forces vertical aiming, even if the aim argument is 0:

Code: Select all

self->Angles.Pitch = P_AimLineAttack (self, self->Angles.Yaw, MISSILERANGE, &t, 60., 0, aim ? self->target : NULL);
Moreover, if you do target = null, A_CustomRailgun doesn't produce any rails at all.

That makes it impossible to actually use it as a utility function that simply performs a linear attack. Yes, I know that can be performed manually via LineTrace and such, but A_CustomRailGun can be convenient under some circumstances, and the way the aim currently works makes no sense.

Suggestion: add either aim 3, or a flag (something like RGF_IGNORETARGET or RGF_DONTFORCEAIM) that disables all kinds of aiming completely.

Top