mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-16 17:11:28 +00:00
Rotate wallsprite objects 90 degrees to match SRB2's papersprite behavior
This commit is contained in:
parent
b3b327a6c3
commit
7fda81ac57
1 changed files with 5 additions and 3 deletions
|
@ -378,11 +378,13 @@ namespace CodeImp.DoomBuilder.VisualModes
|
||||||
// Similar to FLATSPRITE but is not affected by pitch.
|
// Similar to FLATSPRITE but is not affected by pitch.
|
||||||
case ThingRenderMode.WALLSPRITE:
|
case ThingRenderMode.WALLSPRITE:
|
||||||
transform = Matrix.Scaling((float)thing.ScaleX, (float)thing.ScaleX, (float)thing.ScaleY);
|
transform = Matrix.Scaling((float)thing.ScaleX, (float)thing.ScaleX, (float)thing.ScaleY);
|
||||||
|
|
||||||
|
float paperspriteangle = (float)(thing.Angle + Angle2D.PIHALF);
|
||||||
|
|
||||||
// Apply roll?
|
// Apply roll?
|
||||||
if(thing.Roll != 0)
|
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)
|
if(info.RollCenter)
|
||||||
transform *= Matrix.Translation((float)-centerx, (float)-centerx, (float)-centerz) * rotation * Matrix.Translation((float)centerx, (float)centerx, (float)centerz);
|
transform *= Matrix.Translation((float)-centerx, (float)-centerx, (float)-centerz) * rotation * Matrix.Translation((float)centerx, (float)centerx, (float)centerz);
|
||||||
else
|
else
|
||||||
|
@ -390,7 +392,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transform *= Matrix.RotationZ((float)thing.Angle);
|
transform *= Matrix.RotationZ(paperspriteangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply transform
|
// Apply transform
|
||||||
|
|
Loading…
Reference in a new issue