From 5d58612d0543b56222dc9fefdc553ca42eb9405b Mon Sep 17 00:00:00 2001 From: MaxED <j.maxed@gmail.com> Date: Sun, 13 May 2012 21:21:29 +0000 Subject: [PATCH] GZDoomBuilder 1.05b: Actors, which can't be placed in editing mode aren't added to MODELDEF override list, thus preventing crash on map open. --- Source/Core/GZBuilder/GZGeneral.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/GZBuilder/GZGeneral.cs b/Source/Core/GZBuilder/GZGeneral.cs index 20e9ce0af..0507f1e85 100644 --- a/Source/Core/GZBuilder/GZGeneral.cs +++ b/Source/Core/GZBuilder/GZGeneral.cs @@ -110,8 +110,10 @@ namespace CodeImp.DoomBuilder.GZBuilder //and for actors defined in DECORATE ICollection<ActorStructure> ac = General.Map.Data.Decorate.Actors; - foreach (ActorStructure actor in General.Map.Data.Decorate.Actors) - Actors.Add(actor.ClassName.ToLower(), actor.DoomEdNum); + foreach (ActorStructure actor in ac) { + if (actor.DoomEdNum != -1) //we don't need actors without DoomEdNum + Actors.Add(actor.ClassName.ToLower(), actor.DoomEdNum); + } Dictionary<string, ModelDefEntry> modelDefEntriesByName = new Dictionary<string, ModelDefEntry>(); -- GitLab