Fixed null reference in visual mode when trying to render a thing without a sector (reported by Ozymandias81)

This commit is contained in:
ZZYZX 2018-06-23 19:20:39 +03:00
parent b026e58a89
commit 50d458f764
5 changed files with 10 additions and 7 deletions

Binary file not shown.

View file

@ -1,4 +1,4 @@
URL http://devbuilds.drdteam.org/gzdbbf/
FileName Builder.exe
UpdateName GZDoom_Builder_Bugfix-r[REVNUM].7z
UpdaterName GZDB_Updater-x86.7z
UpdateName GZDoom_Builder_Bugfix-r[REVNUM]-x64.7z
UpdaterName GZDB_Updater-x64.7z

View file

@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.3029")]
[assembly: AssemblyVersion("2.3.0.3030")]
[assembly: NeutralResourcesLanguageAttribute("en")]
[assembly: AssemblyHash("3c433cf")]
[assembly: AssemblyHash("b026e58")]

View file

@ -964,6 +964,7 @@ namespace CodeImp.DoomBuilder.Rendering
// [ZZ] apply desaturation
if (t.Thing.Sector != null)
graphics.Shaders.World3D.Desaturation = t.Thing.Sector.Desaturation;
else graphics.Shaders.World3D.Desaturation = 0;
// Apply changes
ApplyMatrices3D();
@ -1661,8 +1662,10 @@ namespace CodeImp.DoomBuilder.Rendering
if (t.Thing.Sector != null) graphics.Shaders.World3D.LightColor = t.Thing.Sector.FogColor;
graphics.Shaders.World3D.CameraPosition = new Vector4(cameraposition.x, cameraposition.y, cameraposition.z, t.FogFactor);
}
graphics.Shaders.World3D.Desaturation = t.Thing.Sector.Desaturation;
if (t.Thing.Sector != null)
graphics.Shaders.World3D.Desaturation = t.Thing.Sector.Desaturation;
else graphics.Shaders.World3D.Desaturation = 0;
GZModel model = General.Map.Data.ModeldefEntries[t.Thing.Type].Model;
for (int j = 0; j < model.Meshes.Count; j++)

View file

@ -29,5 +29,5 @@ using System.Resources;
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.3.0.3029")]
[assembly: AssemblyVersion("2.3.0.3030")]
[assembly: NeutralResourcesLanguageAttribute("en")]