Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zadium committed Dec 11, 2023
1 parent f4db285 commit 10ded71
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ChessBoard.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
@author: Zai Dium
@update: 2022-02-16
@version: 1.19
@revision: 995
@revision: 1061
@localfile: ?defaultpath\Chess\[email protected]
@license: MIT
@license: by-nc-sa [https://creativecommons.org/licenses/by-nc-sa/4.0/]
@notice:
Expand Down Expand Up @@ -408,7 +408,7 @@ resized()
unit.y = size.y / 8;
}

touched(vector p) {
touch_xy(vector p) {
list values = llGetLinkPrimitiveParams(LINK_THIS, [PRIM_POSITION, PRIM_ROTATION]);
vector center = llList2Vector(values, 0);
p = (p - center) / llList2Rot(values, 1);
Expand Down Expand Up @@ -686,16 +686,16 @@ default
showDialog(id);
else if (link == 1) { //* 1 is the root CheadBoard
vector p = llDetectedTouchPos(0);
touched(p);
touch_xy(p);
}
else //* a Piece touched
else //* a Piece touch_xy
{
list l = llGetLinkPrimitiveParams(link, [PRIM_NAME, PRIM_POSITION]);
string name = llList2String(l, 0);
if (llListFindList(fenNames, [name])>=0) //* only chess pieces can move
{
vector pos = llList2Vector(l, 1);
touched(pos);
touch_xy(pos);
}
}
}
Expand Down Expand Up @@ -813,4 +813,4 @@ default
}
}
}
}
}

0 comments on commit 10ded71

Please sign in to comment.