diff --git a/src/g_shared/sbarinfo.cpp b/src/g_shared/sbarinfo.cpp index 72389c628..1808308be 100644 --- a/src/g_shared/sbarinfo.cpp +++ b/src/g_shared/sbarinfo.cpp @@ -1115,12 +1115,12 @@ public: if((offsetflags & SBarInfoCommand::CENTER) == SBarInfoCommand::CENTER) { - x -= (texture->GetScaledWidthDouble()/2.0)-texture->LeftOffset; - y -= (texture->GetScaledHeightDouble()/2.0)-texture->TopOffset; + dx -= (texture->GetScaledWidthDouble()/2.0)-texture->LeftOffset; + dy -= (texture->GetScaledHeightDouble()/2.0)-texture->TopOffset; } - x += xOffset; - y += yOffset; + dx += xOffset; + dy += yOffset; double w, h; if(!fullScreenOffsets) { diff --git a/src/g_shared/sbarinfo_commands.cpp b/src/g_shared/sbarinfo_commands.cpp index f5dcf198e..c107de090 100644 --- a/src/g_shared/sbarinfo_commands.cpp +++ b/src/g_shared/sbarinfo_commands.cpp @@ -1202,6 +1202,9 @@ class CommandDrawSelectedInventory : public SBarInfoCommandFlowControl, private void Draw(const SBarInfoMainBlock *block, const DSBarInfo *statusBar) { + if(alternateOnEmpty) + SBarInfoCommandFlowControl::Draw(block, statusBar); + if(statusBar->CPlayer->mo->InvSel != NULL && !(level.flags & LEVEL_NOINVENTORYBAR)) { if(artiflash && artiflashTick) @@ -1214,9 +1217,6 @@ class CommandDrawSelectedInventory : public SBarInfoCommandFlowControl, private if(alwaysShowCounter || statusBar->CPlayer->mo->InvSel->Amount != 1) CommandDrawNumber::Draw(block, statusBar); } - - if(alternateOnEmpty) - SBarInfoCommandFlowControl::Draw(block, statusBar); } void Parse(FScanner &sc, bool fullScreenOffsets) {