Linedef and Thing arguments are new set to 0 when converting a map to Doom map format.

Fixed a crash when executing "Toggle Geometry Effects" (Tab).
This commit is contained in:
MaxED 2013-08-20 08:21:20 +00:00
parent d09c7b3944
commit 76dc4574ab
2 changed files with 9 additions and 2 deletions

View file

@ -1712,6 +1712,11 @@ namespace CodeImp.DoomBuilder {
} else if(oldFormatInterface != "UniversalMapSetIO" && config.FormatInterface == "UniversalMapSetIO") {
foreach(Linedef l in General.Map.Map.Linedefs) l.TranslateToUDMF();
foreach(Thing t in General.Map.Map.Things) t.TranslateToUDMF();
} else if(oldFormatInterface != "DoomMapSetIO" && config.FormatInterface == "DoomMapSetIO") { //drop all arguments
foreach (Linedef l in General.Map.Map.Linedefs)
for(int i = 0; i < l.Args.Length; i++) l.Args[i] = 0;
foreach (Thing t in General.Map.Map.Things)
for(int i = 0; i < t.Args.Length; i++) t.Args[i] = 0;
}
General.Map.Map.UpdateCustomLinedefColors();

View file

@ -709,8 +709,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
if (!gzdoomRenderingEffects) {
if(sectordata != null && sectordata.Count > 0) {
//rebuild sectors with effects
foreach(KeyValuePair<Sector, SectorData> group in sectordata)
group.Value.Reset();
foreach (KeyValuePair<Sector, SectorData> group in sectordata) {
SectorData sd = group.Value;
sd.Reset();
}
}
//remove all vertex handles from selection