Fixed, Things mode: fixed a crash when deleting Light/Ambient Sound things when "Show Dynamic Light Radii" / "Show Ambient Sound Radii" settings were enabled.

Fixed: WAD lump index was not appended to lump name when reporting errors during ZDoom text lumps parsing.
This commit is contained in:
MaxED 2016-11-19 20:43:42 +00:00
parent c0b46bc6a5
commit 0cc5374295
3 changed files with 13 additions and 7 deletions

View file

@ -704,7 +704,11 @@ namespace CodeImp.DoomBuilder.ZDoom
errorsource = Path.Combine(datalocation.location, sourcename);
}
if(sourcelumpindex != -1) errorsource += ":" + sourcelumpindex; //mxd
if(sourcelumpindex != -1) //mxd
{
errorsource += ":" + sourcelumpindex;
shorterrorsource += ":" + sourcelumpindex;
}
}
//mxd. This adds a warning to the ErrorLogger

View file

@ -233,7 +233,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.PlotVerticesSet(General.Map.Map.Vertices);
for(int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.PlotAssociations(renderer, association[i], eventlines);
if((highlighted != null) && !highlighted.IsDisposed) BuilderPlug.PlotReverseAssociations(renderer, highlightasso, eventlines);
if(highlighted != null && !highlighted.IsDisposed) BuilderPlug.PlotReverseAssociations(renderer, highlightasso, eventlines);
renderer.Finish();
}
@ -246,7 +246,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
renderer.RenderThingSet(General.Map.ThingsFilter.VisibleThings, alpha);
for(int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.RenderAssociations(renderer, association[i], eventlines);
if((highlighted != null) && !highlighted.IsDisposed)
if(highlighted != null && !highlighted.IsDisposed)
{
renderer.RenderThing(highlighted, General.Colors.Highlight, alpha);
BuilderPlug.RenderReverseAssociations(renderer, highlightasso, eventlines); //mxd
@ -259,14 +259,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(BuilderPlug.Me.ShowLightRadii)
{
eventlines.AddRange(dynamiclightshapes);
if(highlighted != null) eventlines.AddRange(GetDynamicLightShapes(new List<Thing> { highlighted } ));
if(highlighted != null && !highlighted.IsDisposed)
eventlines.AddRange(GetDynamicLightShapes(new List<Thing> { highlighted } ));
}
//mxd. Ambient sound radii
if(BuilderPlug.Me.ShowSoundRadii)
{
eventlines.AddRange(ambientsoundshapes);
if(highlighted != null) eventlines.AddRange(GetAmbientSoundShapes(new List<Thing> { highlighted }));
if(highlighted != null && !highlighted.IsDisposed)
eventlines.AddRange(GetAmbientSoundShapes(new List<Thing> { highlighted }));
}
//mxd

View file

@ -824,7 +824,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.buttonsoundradii.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonsoundradii.Name = "buttonsoundradii";
this.buttonsoundradii.Size = new System.Drawing.Size(23, 22);
this.buttonsoundradii.Text = "Sound Radii";
this.buttonsoundradii.Text = "Ambient Sound Radii";
this.buttonsoundradii.Click += new System.EventHandler(this.buttonsoundradii_Click);
//
// fileMenuStrip
@ -922,7 +922,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.itemsoundradii.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.SoundRadius;
this.itemsoundradii.Name = "itemsoundradii";
this.itemsoundradii.Size = new System.Drawing.Size(212, 22);
this.itemsoundradii.Text = "Show Sound Radii";
this.itemsoundradii.Text = "Show Ambient Sound Radii";
this.itemsoundradii.Click += new System.EventHandler(this.buttonsoundradii_Click);
//
// MenusForm