// This detaches a sidedef from the front internal void DetachSidedefP(Sidedef s) { // Sidedef is on the front? if (front == s) { // Remove sidedef reference if (front != null) { front.SetLinedefP(null); } front = null; updateneeded = true; } // Sidedef is on the back? else if (back == s) { // Remove sidedef reference if (back != null) { back.SetLinedefP(null); } back = null; updateneeded = true; } //else throw new Exception("Specified Sidedef is not attached to this Linedef."); }
// Passive version, does not record the change internal void AttachBackP(Sidedef s) { // Attach and recalculate back = s; if (back != null) { back.SetLinedefP(this); } updateneeded = true; }
// Passive version, does not record the change internal void AttachFrontP(Sidedef s) { // Attach and recalculate front = s; if (front != null) { front.SetLinedefP(this); } updateneeded = true; }