You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leash particles persist forever in some cases due to an incorrect distance calculation in oc_particle that results in the LockGuard 'unlink' command being ignored
#965
Closed
cudatox opened this issue
Jul 23, 2023
· 2 comments
What behavior did you expect?
The collar should respond correctly to the 'unlink' command by removing the particles connecting the collar to the target
What behavior did you see instead?
The particles continue to persist forever
What steps does someone need to take to reproduce the problem?
This was tested using the LockGuard plugin for AVSitter 2.2. Simply sit on any piece of furniture that is using this plugin and is located far from the region origin. When you stand up, the collar will not unleash itself. I have also noted this issue on some furniture not using AVSitter.
The issue seems to lie in the manner in which the distance calculation is preformed in oc_particle (~line 756). On some furniture, LockGuard does not send the chain target (parsed into kLGTarget) when sending the unlink command to the collar. This results in kLGTarget being assigned NULL_KEY and when it is subsequently used in the distance calculation, it results in an incorrect distance value that may exceed the limit (g_iLeashLength). This usually results in the unlink command being ignored.
I was able to correct this issue in my experimentation by bypassing the leash length check for the unlink command, but I'm not sure what the other potential consequences of doing this would be:
if(llVecDist(llGetPos(), (vector)llList2String(llGetObjectDetails(kLGTarget, [OBJECT_POS]),0)) > g_iLeashLength){
//Leash length is irrelevant for the unlink command
if (sLGCMD != "unlink"){
return;
}
}
The text was updated successfully, but these errors were encountered:
What version of OpenCollar are you using?
8.2.3
What behavior did you expect?
The collar should respond correctly to the 'unlink' command by removing the particles connecting the collar to the target
What behavior did you see instead?
The particles continue to persist forever
What steps does someone need to take to reproduce the problem?
This was tested using the LockGuard plugin for AVSitter 2.2. Simply sit on any piece of furniture that is using this plugin and is located far from the region origin. When you stand up, the collar will not unleash itself. I have also noted this issue on some furniture not using AVSitter.
The issue seems to lie in the manner in which the distance calculation is preformed in oc_particle (~line 756). On some furniture, LockGuard does not send the chain target (parsed into kLGTarget) when sending the unlink command to the collar. This results in kLGTarget being assigned NULL_KEY and when it is subsequently used in the distance calculation, it results in an incorrect distance value that may exceed the limit (g_iLeashLength). This usually results in the unlink command being ignored.
I was able to correct this issue in my experimentation by bypassing the leash length check for the unlink command, but I'm not sure what the other potential consequences of doing this would be:
The text was updated successfully, but these errors were encountered: