mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
remove network stuff
This commit is contained in:
parent
f7bcffd255
commit
c2500cfd7d
5 changed files with 26 additions and 26 deletions
|
@ -153,15 +153,15 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Already set isdisposed so that changes can be prohibited
|
||||
isdisposed = true;
|
||||
|
||||
if (map == General.Map.Map && General.Network != null && General.Network.ActionRunning)
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
|
||||
// Dispose sidedefs
|
||||
if((front != null) && map.AutoRemove) front.Dispose(); else AttachFrontP(null);
|
||||
if((back != null) && map.AutoRemove) back.Dispose(); else AttachBackP(null);
|
||||
|
||||
if(map == General.Map.Map)
|
||||
|
||||
if (map == General.Map.Map)
|
||||
{
|
||||
General.Map.UndoRedo.RecRemLinedef(this);
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
}
|
||||
|
||||
// Remove from main list
|
||||
map.RemoveLinedef(listindex);
|
||||
|
|
|
@ -174,9 +174,6 @@ namespace CodeImp.DoomBuilder.Map
|
|||
{
|
||||
// Already set isdisposed so that changes can be prohibited
|
||||
isdisposed = true;
|
||||
|
||||
if (map == General.Map.Map && General.Network != null && General.Network.ActionRunning)
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
|
||||
// Dispose the sidedefs that are attached to this sector
|
||||
// because a sidedef cannot exist without reference to its sector.
|
||||
|
@ -184,9 +181,12 @@ namespace CodeImp.DoomBuilder.Map
|
|||
foreach(Sidedef sd in sidedefs) sd.Dispose();
|
||||
else
|
||||
foreach(Sidedef sd in sidedefs) sd.SetSectorP(null);
|
||||
|
||||
if(map == General.Map.Map)
|
||||
|
||||
if (map == General.Map.Map)
|
||||
{
|
||||
General.Map.UndoRedo.RecRemSector(this);
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
}
|
||||
|
||||
// Remove from main list
|
||||
map.RemoveSector(listindex);
|
||||
|
|
|
@ -127,14 +127,14 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Already set isdisposed so that changes can be prohibited
|
||||
isdisposed = true;
|
||||
|
||||
if (map == General.Map.Map && General.Network != null && General.Network.ActionRunning)
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
|
||||
if(map == General.Map.Map)
|
||||
if (map == General.Map.Map)
|
||||
{
|
||||
General.Map.UndoRedo.RecRemSidedef(this);
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
}
|
||||
|
||||
// Remove from main list
|
||||
map.RemoveSidedef(listindex);
|
||||
// Remove from main list
|
||||
map.RemoveSidedef(listindex);
|
||||
|
||||
// Detach from linedef
|
||||
if(linedef != null) linedef.DetachSidedefP(this);
|
||||
|
|
|
@ -162,11 +162,11 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Not already disposed?
|
||||
if(!isdisposed)
|
||||
{
|
||||
if (map == General.Map.Map && General.Network != null && General.Network.ActionRunning)
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
|
||||
if(map == General.Map.Map)
|
||||
if (map == General.Map.Map)
|
||||
{
|
||||
General.Map.UndoRedo.RecRemThing(this);
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
}
|
||||
|
||||
// Remove from main list
|
||||
map.RemoveThing(listindex);
|
||||
|
|
|
@ -118,9 +118,6 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Already set isdisposed so that changes can be prohibited
|
||||
isdisposed = true;
|
||||
|
||||
if (map == General.Map.Map && General.Network != null && General.Network.ActionRunning)
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
|
||||
if(map.AutoRemove)
|
||||
{
|
||||
// Dispose the lines that are attached to this vertex
|
||||
|
@ -132,10 +129,13 @@ namespace CodeImp.DoomBuilder.Map
|
|||
// Detach from linedefs
|
||||
foreach(Linedef ld in linedefs) ld.DetachVertexP(this);
|
||||
}
|
||||
|
||||
if(map == General.Map.Map)
|
||||
|
||||
if (map == General.Map.Map)
|
||||
{
|
||||
General.Map.UndoRedo.RecRemVertex(this);
|
||||
|
||||
General.Map.Map.RemovedElements.Add(this);
|
||||
}
|
||||
|
||||
// Remove from main list
|
||||
map.RemoveVertex(listindex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue