Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
lickx committed Mar 10, 2023
2 parents 6c6d7f7 + 74c59ea commit 19b24c9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
5 changes: 4 additions & 1 deletion doc/opensim-patches.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ Recommended patches for OpenSim
You wouldn't believe how often I got a "bug report" for what is actually a bug in OpenSim itself. Unfortunately the core devs don't see the urgency to address these problems in mainstream OpenSim, so you'll have to patch the OpenSim sourcecode yourself!

[Mantis 8366](http://opensimulator.org/mantis/view.php?id=8366)
This fixes state being lost or even non-working scripts for any hypergrid visitors you receive at your sim. If you have been wondering why your collar (and other scripted attachments) lost any and all settings when hypergridding, this is it.
This fixes state being lost or even non-working scripts for any hypergrid visitors you receive at your sim. If you have been wondering why your collar (and other scripted attachments) lost any and all settings when hypergridding, this is it. The destination sim will have to apply these patches.

[Mantis 8366](http://opensimulator.org/mantis/view.php?id=8366) and [Mantis 9052](http://opensimulator.org/mantis/view.php?id=9052)
After a TP to the hypergrid, your attachments won't be set to the active group tag for that grid, which is needed if you allow access from that group on the collar. The destination sim will have to apply these patches.

[Mantis 6311](http://opensimulator.org/mantis/view.php?id=6311) [Patch here](https://github.com/lickx/opensim-lickx/wiki/6311)
This affects RLVa, when declining a folder given to your shared #RLV folder by a scripted object/trap. Accepting seems to be working now since OpenSim 0.9.2, decline will only work correctly after this patch is applied.
Expand Down
12 changes: 6 additions & 6 deletions src/ao/oc_ao.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// Debug(string sStr) { llOwnerSay("Debug ["+llGetScriptName()+"]: " + sStr); }

string g_sVersion = "2023.01.26";
string g_sVersion = "2023.03.10";

integer g_iInterfaceChannel = -12587429;
integer g_iHUDChannel = -1812221819;
Expand Down Expand Up @@ -64,7 +64,7 @@ float g_Yoff = 0.002; // space between buttons and screen top/bottom border
float g_Zoff = 0.06; // space between buttons and screen left/right border

list g_lButtons ; // buttons names for Order menu
list g_lPrimOrder = [0,1,2,3,4,5]; // -- List must always start with '0','1'
list g_lPrimOrder = [0,1,2,3,4]; // -- List must always start with '0','1'
// -- 0:Spacer, 1:Root, 2:Power, 3:Sit Anywhere, 4:Menu, 5:Device
// -- Spacer serves to even up the list with actual link numbers

Expand Down Expand Up @@ -96,7 +96,7 @@ string g_sStyle = "Dark";

integer JsonValid(string sTest)
{
if (llSubStringIndex(JSON_FALSE+JSON_INVALID+JSON_NULL,sTest) != -1)
if (llSubStringIndex(JSON_FALSE+JSON_INVALID+JSON_NULL,sTest) >= 0)
return FALSE;
return TRUE;
}
Expand All @@ -107,7 +107,7 @@ FindButtons()
g_lButtons = [" ", "Minimize"] ; // 'Minimize' need for g_sTexture
g_lPrimOrder = [0, LINK_ROOT]; // '1' - root prim
integer i;
for (i = 2; i <= llGetNumberOfPrims(); i++) {
for (i = 2; i <= llGetNumberOfPrims(); ++i) {
g_lButtons += llGetLinkName(i);
g_lPrimOrder += i;
}
Expand Down Expand Up @@ -172,7 +172,7 @@ DefinePosition()
else fZoff = 0;
integer i;
integer LinkCount=llGetListLength(g_lPrimOrder);
for (i = 2; i <= LinkCount; ++i) {
for (i = 2; i < LinkCount; ++i) {
llSetLinkPrimitiveParamsFast(llList2Integer(g_lPrimOrder, i),[PRIM_POSITION, <0,fYoff*(i-1),fZoff*(i-1)>]);
}
}
Expand Down Expand Up @@ -226,7 +226,7 @@ SetAnimOverride()
string sAnimState;
do {
sAnimState = llList2String(g_lAnimStates, i);
if (llSubStringIndex(g_sJson_Anims, sAnimState) != -1) {
if (llSubStringIndex(g_sJson_Anims, sAnimState) >= 0) {
sAnim = llJsonGetValue(g_sJson_Anims, [sAnimState]);
if (JsonValid(sAnim)) {
if (sAnimState == "Walking" && g_sWalkAnim != "")
Expand Down
8 changes: 4 additions & 4 deletions src/device/oc_com.lsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// oc_com.lsl
//
// Copyright (c) 2008 - 2017 Nandana Singh, Garvin Twine, Cleo Collins,
Expand Down Expand Up @@ -339,9 +338,10 @@ default
}
key kOwnerID = llGetOwnerKey(kID);
if (iChan == g_iHUDChan) {
if (sMsg == (string)g_kWearer + ":ping")
if (sMsg == (string)g_kWearer + ":ping") {
llMessageLinked(LINK_AUTH, CMD_ZERO, "ping", kOwnerID);
else if (llSubStringIndex(sMsg,(string)g_kWearer + ":") == 0){
llRegionSayTo(kID, g_iHUDChan, (string)g_kWearer+":pong");
} else if (llSubStringIndex(sMsg,(string)g_kWearer + ":") == 0){
sMsg = llGetSubString(sMsg, 37, -1);
llMessageLinked(LINK_AUTH, CMD_ZERO, sMsg, kOwnerID);
} else
Expand Down Expand Up @@ -545,4 +545,4 @@ default
llOwnerSay(sMessage);
}
}
}
}
2 changes: 1 addition & 1 deletion src/device/oc_sys.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//on menu request, give dialog, with alphabetized list of submenus
//on listen, send submenu link message

string g_sCollarVersion="2023.02.04";
string g_sCollarVersion="2023.02.13";

key g_kWearer = NULL_KEY;

Expand Down
20 changes: 8 additions & 12 deletions src/spares/oc_grabbypost.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@ list listeners=[]; // collar pong listeners per victim
//=
//= returns : Channel iNumber to be used
//===============================================================================
integer GetOwnerChannel(key kOwner, integer iOffset)
{
integer iChan = (integer)("0x"+llGetSubString((string)kOwner,2,7)) + iOffset;
if (iChan > 0) iChan *= -1;
if (iChan > -10000) iChan -= 30000;
return iChan;
integer PersonalChannel(string sID, integer iOffset) {
return -llAbs((integer)("0x"+llGetSubString(sID,-7,-1)) + iOffset);
}

// resets the menu dialog
Expand Down Expand Up @@ -88,9 +84,9 @@ notFound(key k)
// leash a victim
leash(key k)
{
integer channel=GetOwnerChannel(k,1111);
integer channel=PersonalChannel((string)k,0);
llRegionSayTo(k,channel,"length "+(string) LEASH_LENGTH);
llRegionSayTo(k,channel,"leashto "+(string) llGetKey());
llRegionSayTo(k,channel,"anchor "+(string) llGetKey());
}

default
Expand Down Expand Up @@ -217,8 +213,8 @@ default
// get the collar wearer's name
string sName=llKey2Name(wearer);

// cut to max. 24 characters and add to the list of names
victimNames+=[llGetSubString(sName,0,23)];
// cut to max. 11 characters and add to the list of names
victimNames+=[llGetSubString(sName,0,11)];
// add to the list of keys
victimKeys+=[wearer];

Expand Down Expand Up @@ -249,14 +245,14 @@ default
if(k!=menuUser)
{
// calculate collar channel per victim and add a listener
channel=GetOwnerChannel(k,1111);
channel=PersonalChannel((string)k,0);
listeners+=
[
llListen(channel,"",NULL_KEY,"")
];

// ping victim's collar
llRegionSayTo(k,channel,"ping");
llRegionSayTo(k,channel,(string)k+":ping");
}
}

Expand Down

0 comments on commit 19b24c9

Please sign in to comment.