mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-12 23:54:33 +00:00
Apply WOF_Relative to A_Overlay/WeaponOffset as well if specified.
This commit is contained in:
parent
f9f6e896f3
commit
06b3e384a8
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue