- stop weapon from moving up and down while cl_weaponsway 0 is set.

* Default zDelta is -2048, so only add (zDelta / 128.) if `cl_weaponsway 1` and add (-2048. / 128.) otherwise.
* Fixes #134 a bit better.
This commit is contained in:
Mitchell Richters 2020-08-11 08:40:42 +10:00
parent 5b91a11404
commit 7243c08379

View file

@ -107,11 +107,15 @@ void hudDraw(PLAYER *gView, int nSectnum, int defaultHoriz, double bobx, double
DTA_ViewportX, windowxy1.x, DTA_ViewportY, windowxy1.y, DTA_ViewportWidth, windowxy2.x - windowxy1.x + 1, DTA_ViewportHeight, windowxy2.y - windowxy1.y + 1, TAG_DONE);
}
double cX = 160;
double cY = 220 + (zDelta / 128.);
double cY = 220;
if (cl_weaponsway)
{
cX += bobx / 256.;
cY += boby / 256.;
cX += (bobx / 256.);
cY += (boby / 256.) + (zDelta / 128.);
}
else
{
cY += (-2048. / 128.);
}
int nShade = sector[nSectnum].floorshade;
int nPalette = 0;