Apply WOF_Relative to A_Overlay/WeaponOffset as well if specified.

This commit is contained in:
Major Cooke 2020-09-30 16:34:33 -05:00 committed by Christoph Oelckers
parent f9f6e896f3
commit 06b3e384a8

View file

@ -803,6 +803,15 @@ void A_OverlayOffset(AActor *self, int layer, double wx, double wy, int flags)
if (psp == nullptr)
return;
if (flags & WOF_RELATIVE)
{
DAngle rot = psp->rotation;
double c = rot.Cos(), s = rot.Sin();
double nx = wx * c + wy * s;
double ny = wx * s - wy * c;
wx = nx; wy = ny;
}
if (!(flags & WOF_KEEPX))
{
if (flags & WOF_ADD)