From 3c87c8f7d93db4246d6c8c43e01200ff9b8f3f94 Mon Sep 17 00:00:00 2001 From: Redo Date: Sun, 16 Oct 2022 20:14:09 -0600 Subject: [PATCH] make ctrl+select select single stud again --- classes/server/duplimode/boxselect.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/classes/server/duplimode/boxselect.cs b/classes/server/duplimode/boxselect.cs index a6f8e50..599815a 100644 --- a/classes/server/duplimode/boxselect.cs +++ b/classes/server/duplimode/boxselect.cs @@ -145,8 +145,11 @@ function NDM_BoxSelect::onSelectObject(%this, %client, %obj, %pos, %normal) if(%client.ndMultiSelect) { %box1 = %client.ndSelectionBox.getWorldBox(); - //%box2 = ndGetPlateBoxFromRayCast(%pos, %normal); - %box2 = %obj.getWorldBox(); + + if(%client.ndInitialMultiSelect) + %box2 = ndGetPlateBoxFromRayCast(%pos, %normal); + else + %box2 = %obj.getWorldBox(); %p1 = getMin(getWord(%box1, 0), getWord(%box2, 0)) SPC getMin(getWord(%box1, 1), getWord(%box2, 1)) @@ -174,10 +177,11 @@ function NDM_BoxSelect::onSelectObject(%this, %client, %obj, %pos, %normal) %client.ndSelectionBox = ND_SelectionBox(%shapeName); - // if(%client.ndMultiSelect) - // %box = ndGetPlateBoxFromRayCast(%pos, %normal); - // else + if(%client.ndMultiSelect) + %box = ndGetPlateBoxFromRayCast(%pos, %normal); + else %box = %obj.getWorldBox(); + %client.ndInitialMultiSelect = %client.ndMultiSelect; %p1 = getWords(%box, 0, 2); %p2 = getWords(%box, 3, 5);