Jump to content

RLV / Temp Attachments


Extrude Ragu
 Share

You are about to reply to a thread that has been inactive for 702 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

In my sim Kokoro Academy we use the Experience Permission system to llAttachToAvatarTemp(...) a multi-function HUD of sorts.

One of the functions of the HUD is to issue a few RLV restrictions to get privacy in the sim (Our layout is ill-suited to parcels for many reasons). Notably we limit camdistmax, fartouch and sittp to 16 meters.

This all works fine, until you teleport out of the sim - In theory, temp attachments are supposed to detach from the agent when leaving the sim. In practice, they often only get detached on the server side, and remain attached client side as a 'ghosted' HUD. Often, simply right clicking a ghosted HUD is enough to get it to disappear, but sometimes you can't remove it until relog. The RLV restrictions therefor become applied even outside our sim because the viewer thinks the HUD is still attached when it isn't. There are even cases where the HUD is detached client side, but somehow the restrictions remain.

Obviously that is problematic, but so far I've not had any clever ideas to workaround this issue other than advise people to simply relog after leaving the sim - Not ideal - Anyone came across this problem before, knows of a workaround? Are there any things that can be adjusted about a temp hud, to make it less likely to be ghosted? Or a way of issuing RLV restrictions in such a way that leaving the parcel they were issued from will always remove the restrictions, even if the HUD remains attached client side?

Any help at all would be appreciated :)

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Extrude Ragu said:

Often, simply right clicking a ghosted HUD is enough to get it to disappear, but sometimes you can't remove it until relog. The RLV restrictions therefor become applied even outside our sim because the viewer thinks the HUD is still attached when it isn't. There are even cases where the HUD is detached client side, but somehow the restrictions remain.

Isn't all of RLV strictly viewer-side? If so, I'm not sure there's anything a script can do to fix the problem. It would be kind of surprising if a script inside the object ever survived into a new region, so it would be very interesting if it could trigger on CHANGED_REGION.

I guess I'd suggest trying to replicate the basic stuck-attachment problem with all RLV code removed from the temp-attached HUD. Another thing to try might be to make all the HUDs be AVsitter PROP1 attachments, auto-temp-attached using with the AVsitter Experience (the one created by Code Violet); there's nothing magical about those scripts but using them I haven't seen this stuck-attachment problem myself (but then I don't use RLV).

Edited by Qie Niangao
CHANGED_REGION, not _TELEPORT
  • Thanks 1
Link to comment
Share on other sites

39 minutes ago, Qie Niangao said:

It would be kind of surprising if a script inside the object ever survived into a new region, so it would be very interesting if it could trigger on CHANGED_REGION.

I just tried this, I put a script in my HUD that has been temp attached using Experience Permissions

default
{
    changed(integer change)
    {
    	llOwnerSay("change " + (string)change);
    }
}

I then teleported out of my Experience enabled region (Note that temp attached items that were attached with Experience Permissions behave differently according to wiki)

A change event was indeed raised and a message entered the chat. change 768

768 is CHANGED_REGION and CHANGED_TELEPORT. So both events fire from a temp attached item via experienced perms when leaving the experience region

 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Also noting that, the RLV portion of my script did have an @clear RLV command  on detach event but the RLV restrictions never cleared.

I had a lot of scripts in my HUD that hook the attach event for one reason or another. I theorized that the other attach event handlers in other scripts could cause enough execution time to prevent the RLV one running.

Seeking to eliminate attach event handling as much as possible I changed the behavior of some of these scripts to use CHANGED_OWNER when possible or simply checking llGetAttached() during an event to determine attachment status rather than establish it from events.

Now when I teleport out of the sim, though the HUD remains visibly attached until right clicked, the RLV restrictions are getting lifted at least. Progress!

  • Like 1
Link to comment
Share on other sites

Further experimentation

Hooking CHANGED_REGION as the point where RLV restrictions are cleared works fine. I thought I'd be smart and see if I could fix the ghosted HUD issue by holding PERMISSION_ATTACH and then calling llDetachFromAvatar before the Experience can 'detach' it incase the Experience detach is what is buggy..

    changed(integer change)
    {
        if (change & CHANGED_REGION) {
            llOwnerSay("@clear");
            if (llGetPermissions() & PERMISSION_ATTACH) {
                llDetachFromAvatar();
                llOwnerSay("Detach called");
            } else {
                llOwnerSay("Permissions lost");
            }
        }
    }

I do receive the "Detach Called" message event in the chat, indicating that llDetachFromAvatar was run, but the HUD remains visible on the Client-side, as a ghosted attachment :(. Luckily simply right clicking the HUD makes it disappear.

So all in all, managed to fix the RLV issue, but no fix for ghosted temp attachments..

  • Like 2
Link to comment
Share on other sites

33 minutes ago, Extrude Ragu said:

So all in all, managed to fix the RLV issue, but no fix for ghosted temp attachments..

Do we think "ghosted" here is purely due to the viewer not receiving (or processing) an update from the server that the detachment is complete, server-side? If these weren't HUDs, we could test by running llGetAttachedList() from a different object's script to see if the server still thinks that HUD is around. Either way, I suppose before the llDetachFromAvatar() it might be possible to shrink the HUD down and push it offscreen with a single llSetLinkPrimitiveParamsFast() on a precomputed parameter list (or even just pushing a blank llSetText() to force an object update before the detach, if it makes some weird difference), assuming any of this can happen without interfering with the actual detach.

Edited by Qie Niangao
"either way" not "say"
Link to comment
Share on other sites

1 hour ago, Extrude Ragu said:

So all in all, managed to fix the RLV issue, but no fix for ghosted temp attachments..

a similar issue occurs with the Linden Realms HUD sometimes. It doesn't detach sometimes when we leave the region. And it usually can be detached manually in the same way as you have found. Sometimes tho it can't be detached manually. Not only does the server think it is detached but so to does the viewer, even tho it is still being rendered. The ghosting problem

I think your solution  to ensure that the RLV script functions are disabled on region change is a good solution, at least in the person no longer having unexpected things happen to them outside of your region

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 702 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...