mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-22 11:51:25 +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
|
@ -379,10 +379,12 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue