From 97ce83d2d89d5f36aed05b4b1abd93afac5a1239 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Mar 2017 19:49:52 +0100 Subject: [PATCH] - let SBARINFO always read ST_X and ST_Y from the wrapper because it just too liberally changes these values in unpredictable ways. --- src/g_statusbar/sbarinfo.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/g_statusbar/sbarinfo.cpp b/src/g_statusbar/sbarinfo.cpp index b718e2703..5a3df7794 100644 --- a/src/g_statusbar/sbarinfo.cpp +++ b/src/g_statusbar/sbarinfo.cpp @@ -1035,7 +1035,6 @@ public: { // Calculate cleanX and cleanY wrapper->ScreenSizeChanged(); } - wrapper->GetCoords(ST_X, ST_Y); int hud = STBAR_NORMAL; if(state == HUD_StatusBar) { @@ -1225,8 +1224,10 @@ public: if(!fullScreenOffsets) { double tmp = 0; - dx += ST_X; - dy += ST_Y - (Scaled ? script->resH : 200) + script->height; + int stX, stY; + wrapper->GetCoords(stX, stY); + dx += stX; + dy += stY - (Scaled ? script->resH : 200) + script->height; w = forceWidth < 0 ? texture->GetScaledWidthDouble() : forceWidth; h = forceHeight < 0 ? texture->GetScaledHeightDouble() : forceHeight; double dcx = clip[0] == 0 ? 0 : dx + clip[0] - texture->GetScaledLeftOffsetDouble(); @@ -1451,8 +1452,10 @@ public: if(!fullScreenOffsets) { - rx += ST_X; - ry += ST_Y - (Scaled ? script->resH : 200) + script->height; + int stX, stY; + wrapper->GetCoords(stX, stY); + rx += stX; + ry += stY - (Scaled ? script->resH : 200) + script->height; if(Scaled) screen->VirtualToRealCoords(rx, ry, rw, rh, script->resW, script->resH, true); else @@ -1520,7 +1523,6 @@ public: player_t *CPlayer = nullptr; DBaseStatusBar *wrapper; bool Scaled; - int ST_X, ST_Y; private: SBarInfo *script;