fix event rotation bug, fix zone lines

This commit is contained in:
Redo
2025-07-22 00:26:35 -07:00
parent 6446a621c6
commit ec36d0d780
2 changed files with 3 additions and 14 deletions

View File

@ -2489,8 +2489,8 @@ function ndBrickGroupFromBlid(%blid) {
}
function ndFindWord(%s, %w, %x, %a) {
if(%a $= "") %a = 1;
%c = getWordCount(%str);
if(%a<=0) %a = 1;
%c = getWordCount(%s);
for(%i = %x+0; %i<%c; %i+=%a) {
if(getWord(%s, %i) $= %w) return %i;
}
@ -2909,14 +2909,6 @@ function ND_Selection::plantBrick(%this, %i, %position, %angleID, %brickGroup, %
case 5: %value = "West";
}
//for(%l = 1; %l < getWordCount(%paramType); %l += 2)
//{
// if(getWord(%paramType, %l) $= %value)
// {
// %param = getWord(%paramType, %l + 1);
// break;
// }
//}
%param = getWord(%paramType, ndFindWord(%paramType, %value, 1, 2)+1);
}
}

View File

@ -22,14 +22,11 @@ function ndShapelineMove(%line, %p1,%p2) {
%rot = %axis SPC %angle;
// calculate shape scale
%scale = "1 1" SPC %vectorLen(%dir);
%scale = "1 1" SPC vectorLen(%dir);
%line.setTransform(%center SPC %rot);
%line.setScale(%scale);
}
function ndShapelineDelete(%line) {
%line.delete();
}
////////////////////////////////////////////////////////////////////////////////
// Box drawing