|
Page 1 of 1
|
[ 4 posts ] |
|
@getoutfit returns unbaked outfit instead of current outfit
Author |
Message |
deepspace
Joined: 2015-02-09 19:41:55 Posts: 12
|
Hi, when calling @getoutfit upon login after RLV is detected, it returns the state of the unbaked outfit (only skin, shape, eyes and hairbase) instead of the outfit in the Current Outfit folder. If this is intentionally designed like this, I'd like to know a way how to detect the avatar is baked in Cool Viewer without just forcing a long delay to sit out the baking process. Cool VL Viewer is the only viewer reporting the avatar as nude. Example code. Put in a prim, attach then relog. | | | | Code: integer g_iRlvOn = FALSE;
integer g_iTimerLogin;
integer RLV_VERSION_CH = 9934004; integer g_iRlvVersionHandle = 0; integer RLV_OUTFIT_CH = 9934002; integer g_iRlvOutfitHandle = 0; integer RLV_ATTACH_CH = 9934005; integer g_iRlvAttachHandle = 0;
default { state_entry() { } attach(key kID) { if (kID==llGetOwner()) llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); } run_time_permissions(integer iPerms) { if (iPerms & PERMISSION_ATTACH) { g_iRlvOn = FALSE; g_iRlvOutfitHandle = llListen(RLV_OUTFIT_CH, "", llGetOwner(), ""); g_iRlvAttachHandle = llListen(RLV_ATTACH_CH, "", llGetOwner(), ""); g_iRlvVersionHandle = llListen(RLV_VERSION_CH, "", llGetOwner(), ""); llOwnerSay("@versionnew="+(string)RLV_VERSION_CH); g_iTimerLogin = llGetUnixTime()+30; llSetTimerEvent(0.5); } } listen(integer ch, string name, key id, string msg) { if (ch==RLV_VERSION_CH) { llListenRemove(g_iRlvVersionHandle); g_iRlvOn = TRUE; } if (ch==RLV_OUTFIT_CH) { llOwnerSay("getoutfit: "+msg); } if (ch==RLV_ATTACH_CH) { llOwnerSay("getattach: "+msg); } } timer() { integer iTimeStamp = llGetUnixTime(); if (iTimeStamp < g_iTimerLogin) { vector vAgentSize = llGetAgentSize(llGetOwner()); if(vAgentSize.z!=1.9 && g_iRlvOn==TRUE) { llSetTimerEvent(0); llOwnerSay("rlv detected; agentsize is "+(string)vAgentSize.z+", most likely de-ruthed"); llOwnerSay("@getoutfit="+(string)RLV_OUTFIT_CH); llOwnerSay("@getattach="+(string)RLV_ATTACH_CH); } } else { llSetTimerEvent(0); llOwnerSay("no rlv detected"); } } }
| | | | |
This will output: Version info:
|
2017-05-15 04:58:08 |
|
|
Henri Beauchamp
Joined: 2009-03-17 18:42:51 Posts: 5550
|
This is in no way a bug. It is totally normal that a non-baked avatar wears nothing till it gets baked after login. It's also normal, when changing outfit, that any @getoutfit occurring during baking will return a stale list of wearables or nothing but the four mandatory body parts as worn.
The "current outfit folder" (COF) is in no way a reliable description of what your avatar is wearing: the Cool VL Viewer can (and actually will, by default) function without the COF at all on OpenSim grids: the COF is only needed for the baking process in SL, but what the avatar actually wears is kept track on the server side, and mirrored by the viewer internal data: that's what the Cool VL Viewer exclusively relies upon (and what makes it totally immune to the shitload of race condition bugs that cause all LL-based v2 viewers to suffer from, such as attachments falling off the avatar on TP, which in turn made LL add yet another shitload of ugly code to work around the race conditions, only opening more cases for new race conditions: the coding of the COF code in LL's viewer is so poor and uselessly convoluted, that I rewrote it from scratch): the Cool VL Viewer algorithm is designed to first send all server requests to wear the outfit, to wait (and retry if necessary) till the sever says every item is worn, the viewer updating the COF accordingly in the mean time; once both the viewer and the server agree on what is worn, the Cool VL Viewer finally launches a baking request (in case of a bake failure, the request is retried; in case of more failures, the COF is refreshed (to increment its version number), and a new request is launched, etc).
Normally, any properly scripted RestrainedLove device will wait for some time after login before checking what the avatar wears or changing what it wears (a dozen of seconds after the on_rez() event is usually more than enough: from your log, a two seconds delay would have been enough). That's what your scripted device should do...
I'll however try to think about a better solution (i.e. extend the RestrainedLove spec with a new feature): perhaps the viewer could delay the @getoutfit reply (thus "pausing" RLV) till the avatar is fully baked, for example...
|
2017-05-15 07:31:43 |
|
|
deepspace
Joined: 2015-02-09 19:41:55 Posts: 12
|
The 'safe' delay i always use for @getoutfit after much testing (for a HUD I wrote) seems to be just under 30 seconds. That is with an already populated inventory. Clearing the cache would cause @getoutfit to report nude after the time-out because the viewer doesn't know yet what's in the COF.
Then I had a 2nd look at the old non-COF system you mentioned and was amazed by the speed the avi baked directly on login while the inventory started populating from scratch (clean cache). So this is what I'll be using from now on with OpenSim, and if possible also on other viewers that allow the COF to be turned off.
I can only imagine the COF put an enormous load on any inventory service, including Linden Lab's own service because on OsGrid the delays are sometimes so large when attaching/wearing things that it queues up and sometimes only after a minute the links are made/removed in the COF.
|
2017-05-15 12:09:43 |
|
|
Henri Beauchamp
Joined: 2009-03-17 18:42:51 Posts: 5550
|
I changed the command queuing logic in today's release: all the commands (but @version* ones) received during a rebake/outfit change are now delayed until the avatar is fully baked.
|
2017-05-20 09:00:06 |
|
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 39 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|