public void FlipVertices() { if (linedef.IsDisposed) { throw new ScriptRuntimeException("Linedef has been disposed, can't FlipVertices."); } linedef.FlipVertices(); }
// Fix by flipping linedefs public override bool Button1Click(bool batchMode) { line.FlipVertices(); //mxd. Otherwise FlipSidedefs() will destroy the sector back side belongs to line.FlipSidedefs(); General.Map.Map.Update(); return(true); }
// Fix a single side public override bool Button1Click(bool batchMode) { // On which side can we fix? if(copysidedeffront != null) { // Front if(!batchMode) General.Map.UndoRedo.CreateUndo("Create front sidedef"); Sidedef newside = General.Map.Map.CreateSidedef(line, true, copysidedeffront.Sector); if(newside == null) return false; copysidedeffront.CopyPropertiesTo(newside); } else if(copysidedefback != null) { // Back // Because the line is single-sided, we make the sidedef on the front. // We will then flip it to make sure to ends up in the right position. if(!batchMode) General.Map.UndoRedo.CreateUndo("Create front sidedef"); Sidedef newside = General.Map.Map.CreateSidedef(line, true, copysidedefback.Sector); if(newside == null) return false; copysidedefback.CopyPropertiesTo(newside); line.FlipVertices(); } line.ApplySidedFlags(); General.Map.Map.Update(); return true; }