Skip to content

Commit

Permalink
improve clear command, at this point region ossl hang
Browse files Browse the repository at this point in the history
  • Loading branch information
zadium committed Nov 11, 2022
1 parent 2ba2706 commit 5a16820
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
11 changes: 9 additions & 2 deletions ChessBoard.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@author: Zai Dium
@update: 2022-02-16
@revision: 265
@revision: 276
@localfile: ?defaultpath\Chess\[email protected]
@license: MIT
Expand Down Expand Up @@ -235,7 +235,14 @@ resetBoard()
}

clearBoard(){
// llMessageLinked(LINK_ALL_CHILDREN, 0, "die", NULL_KEY);
integer c = llGetNumberOfPrims();
integer i = 1; //based on 1
while(i <= c)
{
if (llListFindList(pc, [llGetLinkName(i)])) //* llGetLinkName based on 1
llBreakLink(i);
i++;
}
}

resized()
Expand Down
11 changes: 6 additions & 5 deletions Piece.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@name: Piece
@author: Zai Dium
@update: 2022-02-16
@revision: 223
@revision: 240
@localfile: ?defaultpath\Chess\[email protected]
*/

Expand Down Expand Up @@ -49,14 +49,15 @@ default
llMessageLinked(LINK_ROOT, llGetStartParameter(), "touch", llGetKey());
}

link_message( integer sender_num, integer num, string str, key id )
changed(integer change)
{
if (str=="die")
if (change & CHANGED_LINK)
{
if (llGetStartParameter()>0)
{
if (llGetKey() == llGetLinkKey(LINK_ROOT)) {
llOwnerSay("Die");
//llDie();
}
}
}

}

0 comments on commit 5a16820

Please sign in to comment.