From 6d5098a075706e995105af50b6840fe53afb65bd Mon Sep 17 00:00:00 2001 From: biwa <6475593+biwa@users.noreply.github.com> Date: Sat, 2 Dec 2023 22:16:12 +0100 Subject: [PATCH] 3D Floor Mode: fixed a problem where the previous state of linedef arguments were not preserved for undo snapshots. Fixes #967 --- Source/Plugins/3DFloorMode/ThreeDFloor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/3DFloorMode/ThreeDFloor.cs b/Source/Plugins/3DFloorMode/ThreeDFloor.cs index 9380beba..c102c5ed 100644 --- a/Source/Plugins/3DFloorMode/ThreeDFloor.cs +++ b/Source/Plugins/3DFloorMode/ThreeDFloor.cs @@ -225,10 +225,10 @@ namespace CodeImp.DoomBuilder.ThreeDFloorMode sd.SetTextureMid(bordertexture); if (sd.Line.Action == 160) - { - sd.Line.Args[1] = type; - sd.Line.Args[2] = flags; - sd.Line.Args[3] = alpha; + { + // We need to update the linedef's args, but we can't do it directly because otherwise their state will not be saved for the undo snapshot, + // so we're using the linedef's update method + sd.Line.Update(sd.Line.GetFlags(), sd.Line.Activate, sd.Line.Tags, sd.Line.Action, new int[] { sd.Line.Args[0], type, flags, alpha, sd.Line.Args[4] }); } } }