From 7603e5fa30912a32af922ad1516a0fe0f37d2435 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Mon, 29 May 2017 06:38:11 +0300 Subject: [PATCH] Fixed: INHERITACTORPITCH was actually changed along with USEACTORPITCH...doesn't really make sense compatibility-wise but there it is. (reported by alekv) --- Source/Core/Map/Thing.cs | 18 ++++++++++-------- Source/Core/Properties/AssemblyInfo.cs | 4 ++-- .../BuilderModes/Properties/AssemblyInfo.cs | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Source/Core/Map/Thing.cs b/Source/Core/Map/Thing.cs index 56e88a35..e41a5cbc 100755 --- a/Source/Core/Map/Thing.cs +++ b/Source/Core/Map/Thing.cs @@ -447,14 +447,15 @@ namespace CodeImp.DoomBuilder.Map pitch = General.ClampAngle(newpitch); - switch(rendermode) + switch (rendermode) { case ThingRenderMode.MODEL: - ModelData md = General.Map.Data.ModeldefEntries[type]; - if(md.InheritActorPitch || md.UseActorPitch) - pitchrad = Angle2D.DegToRad((md.InheritActorPitch||!General.Map.Config.BuggyModelDefPitch) ? -pitch : pitch); - else - pitchrad = 0; + float pmult = General.Map.Config.BuggyModelDefPitch ? 1 : -1; + ModelData md = General.Map.Data.ModeldefEntries[type]; + if (md.InheritActorPitch || md.UseActorPitch) + pitchrad = Angle2D.DegToRad(pmult * (md.InheritActorPitch ? -pitch : pitch)); + else + pitchrad = 0; break; case ThingRenderMode.FLATSPRITE: @@ -581,9 +582,10 @@ namespace CodeImp.DoomBuilder.Map switch(rendermode) { case ThingRenderMode.MODEL: - ModelData md = General.Map.Data.ModeldefEntries[type]; + float pmult = General.Map.Config.BuggyModelDefPitch ? 1 : -1; + ModelData md = General.Map.Data.ModeldefEntries[type]; rollrad = (md.UseActorRoll ? Angle2D.DegToRad(roll) : 0); - pitchrad = ((md.InheritActorPitch || md.UseActorPitch) ? Angle2D.DegToRad((md.InheritActorPitch || !General.Map.Config.BuggyModelDefPitch) ? -pitch : pitch) : 0); + pitchrad = ((md.InheritActorPitch || md.UseActorPitch) ? Angle2D.DegToRad(pmult * (md.InheritActorPitch ? -pitch : pitch)) : 0); break; case ThingRenderMode.FLATSPRITE: diff --git a/Source/Core/Properties/AssemblyInfo.cs b/Source/Core/Properties/AssemblyInfo.cs index 6cd35bdc..9c2ef811 100755 --- a/Source/Core/Properties/AssemblyInfo.cs +++ b/Source/Core/Properties/AssemblyInfo.cs @@ -30,6 +30,6 @@ using CodeImp.DoomBuilder; // Build Number // Revision // -[assembly: AssemblyVersion("2.3.0.2977")] +[assembly: AssemblyVersion("2.3.0.2978")] [assembly: NeutralResourcesLanguageAttribute("en")] -[assembly: AssemblyHash("0e43985")] +[assembly: AssemblyHash("d9d8c35")] diff --git a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs index b1b2af14..b5851c32 100755 --- a/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs +++ b/Source/Plugins/BuilderModes/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Resources; // Build Number // Revision // -[assembly: AssemblyVersion("2.3.0.2977")] +[assembly: AssemblyVersion("2.3.0.2978")] [assembly: NeutralResourcesLanguageAttribute("en")]