From 7fda81ac577b17828fbc14bf7ecade1b63717be6 Mon Sep 17 00:00:00 2001 From: spherallic Date: Tue, 7 Nov 2023 16:38:34 +0100 Subject: [PATCH] Rotate wallsprite objects 90 degrees to match SRB2's papersprite behavior --- Source/Core/VisualModes/VisualThing.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/VisualModes/VisualThing.cs b/Source/Core/VisualModes/VisualThing.cs index 125ea525..d00b50a8 100755 --- a/Source/Core/VisualModes/VisualThing.cs +++ b/Source/Core/VisualModes/VisualThing.cs @@ -378,11 +378,13 @@ namespace CodeImp.DoomBuilder.VisualModes // Similar to FLATSPRITE but is not affected by pitch. case ThingRenderMode.WALLSPRITE: transform = Matrix.Scaling((float)thing.ScaleX, (float)thing.ScaleX, (float)thing.ScaleY); - + + float paperspriteangle = (float)(thing.Angle + Angle2D.PIHALF); + // Apply roll? if(thing.Roll != 0) { - rotation = Matrix.RotationY((float)-thing.RollRad) * Matrix.RotationZ((float)thing.Angle); + rotation = Matrix.RotationY((float)-thing.RollRad) * Matrix.RotationZ(paperspriteangle); if(info.RollCenter) transform *= Matrix.Translation((float)-centerx, (float)-centerx, (float)-centerz) * rotation * Matrix.Translation((float)centerx, (float)centerx, (float)centerz); else @@ -390,7 +392,7 @@ namespace CodeImp.DoomBuilder.VisualModes } else { - transform *= Matrix.RotationZ((float)thing.Angle); + transform *= Matrix.RotationZ(paperspriteangle); } // Apply transform