diff --git a/source/common/statusbar/base_sbar.cpp b/source/common/statusbar/base_sbar.cpp index d2026837e..a8fbe20f0 100644 --- a/source/common/statusbar/base_sbar.cpp +++ b/source/common/statusbar/base_sbar.cpp @@ -368,7 +368,7 @@ void DStatusBarCore::SetScale() double screenaspect = w / double(h); double aspectscale = 1.0; - double ViewportAspect = ViewportPixelAspect(); + const double ViewportAspect = 1. / ViewportPixelAspect(); if ((horz == 320 && vert == 200) || (horz == 640 && vert == 400)) { @@ -387,9 +387,9 @@ void DStatusBarCore::SetScale() refw = h * refaspect; } refw *= hud_scalefactor; - refh *= hud_scalefactor * aspectscale / ViewportAspect; + refh *= hud_scalefactor * aspectscale * ViewportAspect; - int sby = vert - int(RelTop * hud_scalefactor * aspectscale / ViewportAspect); + int sby = vert - int(RelTop * hud_scalefactor * aspectscale * ViewportAspect); // Use full pixels for destination size. ST_X = xs_CRoundToInt((w - refw) / 2); diff --git a/source/core/rendering/hw_entrypoint.cpp b/source/core/rendering/hw_entrypoint.cpp index 26c48f807..65f0e9ca8 100644 --- a/source/core/rendering/hw_entrypoint.cpp +++ b/source/core/rendering/hw_entrypoint.cpp @@ -165,10 +165,18 @@ void RenderViewpoint(FRenderViewpoint& mainvp, IntRect* bounds, float fov, float // Stereo mode specific perspective projection di->VPUniforms.mProjectionMatrix = eye.GetProjection(fov, ratio, fovratio); - // Stereo mode specific viewpoint adjustment - vp.Pos += eye.GetViewShift(vp.HWAngles); - di->SetupView(RenderState, vp.Pos.X, vp.Pos.Y, vp.Pos.Z, false, false); + + // Stereo mode specific viewpoint adjustment + if (eye.mShiftFactor != 0) + { + vp.Pos += eye.GetViewShift(vp.HWAngles); + sectortype* sect = §or[vp.SectCount]; + updatesector(DVector2(vp.Pos.X, -vp.Pos.Y), §); + vp.SectCount = sectindex(sect); + } + + di->SetupView(RenderState, vp.Pos.X, vp.Pos.Y, vp.Pos.Z, false, false); di->ProcessScene(toscreen); if (mainview) diff --git a/wadsrc/static/zscript/games/duke/actors/destructibles.zs b/wadsrc/static/zscript/games/duke/actors/destructibles.zs index 85e409aee..59383bfb5 100644 --- a/wadsrc/static/zscript/games/duke/actors/destructibles.zs +++ b/wadsrc/static/zscript/games/duke/actors/destructibles.zs @@ -43,6 +43,12 @@ class DukeStatueFlash : DukeActor { pic "STATUEFLASH"; } + + override void Initialize() + { + self.clipdist = 32; + self.cstat |= CSTAT_SPRITE_BLOCK_ALL; + } override void OnHit(DukeActor proj) {