From 7243c0837939d665de4f9f2040e063d1171a9b7a Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 11 Aug 2020 08:40:42 +1000 Subject: [PATCH] - 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. --- source/blood/src/hudsprites.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/blood/src/hudsprites.cpp b/source/blood/src/hudsprites.cpp index dd9070d20..816861d3e 100644 --- a/source/blood/src/hudsprites.cpp +++ b/source/blood/src/hudsprites.cpp @@ -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;