-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve clear command, at this point region ossl hang
- Loading branch information
Showing
2 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
@author: Zai Dium | ||
@update: 2022-02-16 | ||
@revision: 265 | ||
@revision: 276 | ||
@localfile: ?defaultpath\Chess\[email protected] | ||
@license: MIT | ||
|
@@ -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() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
@name: Piece | ||
@author: Zai Dium | ||
@update: 2022-02-16 | ||
@revision: 223 | ||
@revision: 240 | ||
@localfile: ?defaultpath\Chess\[email protected] | ||
*/ | ||
|
||
|
@@ -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(); | ||
} | ||
} | ||
} | ||
|
||
} |