Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple leash points for pony bits #1128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/collar/oc_particle.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Nikki Lacrima
Aug 2023: Updated for lockguard chain texture
Sept 2024: Fix setting name for leash length
Feb 2025: Support for two leashpoints, "leashpoint" and "fcollar", for ponybits

*/
string g_sScriptVersion = "8.3";
Expand Down Expand Up @@ -177,6 +178,7 @@ FindLinkedPrims() {
if (llListFindList(g_lLeashPrims,["fcollar"]) < 0){
g_lLeashPrims += ["fcollar",LINK_ROOT, "collar", LINK_ROOT, "collarfrontloop", LINK_ROOT];
}
//llOwnerSay(llDumpList2String(g_lLeashPrims," "));
}

Particles(integer iLink, key kParticleTarget, vector vScale) {
Expand Down Expand Up @@ -219,16 +221,20 @@ StartParticles(key kParticleTarget) {
g_sParticleTextureID = g_sLeashParticleTexture;
g_sParticleMode = g_sLeashParticleMode;

integer iIndex = llListFindList(g_lLeashPrims,["collar"]);
if (iIndex > -1) {
integer iInstance = 0;
integer iIndex;
// For pony bit, double leashpoints
while ((iIndex = llListFindListNext(g_lLeashPrims,["collar"],iInstance++)) > -1) {
Particles(llList2Integer(g_lLeashPrims,iIndex+1),kParticleTarget,g_vLeashSize);
g_iLeashActive = TRUE;
}
}

StopParticles(integer iEnd) {
integer iInstance = 0;
integer iIndex = llListFindList(g_lLeashPrims,["collar"]);
if (iIndex > -1) {
// For pony bit, double leashpoints
while ((iIndex = llListFindListNext(g_lLeashPrims,["collar"],iInstance++)) > -1) {
llLinkParticleSystem(llList2Integer(g_lLeashPrims,iIndex+1), []);
}

Expand Down