This repository has been archived by the owner. It is now read-only.
Assets 2

There are two major areas of change, and then a couple of other changes:

  1. The first is the Avatar-as-a-Prim (AaaP) changes, which allow a script to treat a seated avatar as if it were another prim on the end of the link set. This enables all kinds of seated avatar positioning, without, for example, the need for furniture to rez pose balls to sit on (which are then repositioned instead of the avatar).
  2. The second area of change is to support remote console logins based on JSON Web Token (JWT). This is a feature that allows the MOSES team to move to InWorldz Halcyon-based servers for their core production systems.

There are also some fixes and even enhancements included with the avatar-as-a-prim changes that aren't technically directly related:
• Sit target handling is much improved, both in terms of performance and in terms of SL compatibility. The most noticeable change is that many avatars can now sit on a single prim. If there is an unoccupied prim with a sit target, the avatar will be seated there first, but otherwise the presence of a seated avatar no longer produces the That seat is taken by another user. error.
• Various improvements to the LINK_ "wildcards" handling to allow them to be used in more cases now, more consistently. These also now include seated avatars where they match.
• Unlike SL, llGetLinkPrimitiveParams supports the above LINK_ wildcards, so for example, that you can pass LINK_SET, [LINK_NAME, LINK_POSITION] and get a list with prim and seated avatar names and positions. Any reasonable combination is supported. This differs from SL where the response is not useful; SL always returns an empty list: [ ].
• Where a list of object links are provided in some form, the links are now ordered by link number. This is most evident in llGetLinkPrimitiveParams, where wildcard LINK_ values result in a list. For example, LINK_SET, [PRIM_NAME] might now return ["A", "B", "C", "D", "E"] in the correct order of the link numbers. Fixes Mantis #569.
• Updates to llGetLinkName and llGetLinkKey to be consistent with the other similar functions, as well as to support seated avatar "links" now.
• Fixed a long-standing bug that could cause updates from an avatar to not be sent to other avatars. (I believe this is only some unusual edge cases like region startup or shutdown, but could possibly cause a updates from a bot to be skipped if the script rezzed a bot too early in the startup process.)

Avatar-as-a-Prim (AaaP)
This update includes major changes for avatar-as-a-prim (AaaP). Should be mostly backwards-compatible with existing scripts, other than a couple of very exceptional cases. Please let us know if you encounter any incompatibility.

The way it works is that if a script positions or rotates an avatar as if it was a prim, that avatar switches into "avatar-as-a-prim mode" (which means that the avatar becomes parented to the root prim as in SL, and no longer moves with child prim movements). This AaaP mode resets to "legacy" InWorldz mode (avatar moves with any seated prim) if the avatar stands and sits again.

This also includes a reworking of sit targets where there is now a separate list of sit targets for the object (which much more closely models SL semantics).

This update may also fix obscure problems with culling missing or including some prims inappropriately, as well as several timing problems on region crossings/entry that could place the avatar in the sky, or at 0,0,0.

Details
• Per-object and per-prim collections of seated avatars maintained, compatibility mode flag (set by default), avatar still moving with prim moves and rotations.
• Prims now support multiple avatars on the same prim, once any sit targets are occupied (as per SL).
• Implemented llGetLinkName, llGetLinkKey, llGetLinkPrimitiveParams, llSetLinkPrimitiveParams, llSetLinkPrimitiveParamsFast and all prim param setters for seated avatars. This includes support for avatar "link numbers", and full support for param getters. Also includes full support for PRIM_LINK_TARGET changes including avatars, etc. (llGetPrimitiveParams and llSetPrimitiveParams always refer to actual prims and therefore are not connected to AaaP support.)
• Support for recognizing both "AaaP mode" and "legacy IW mode", defaulting to legacy mode on each sit operation, and switching avatars into "AaaP mode" after changes via prim-based position/rotation functions.
• The affected LinkPrimitiveParams functions now supports tracking the params list offset to keep the index in the params list in sync with expected parameters even when ignoring prim params, such as PRIM_TEXT on an avatar (as a prim).
• Much more efficient Order(1) implementation of finding a seated avatar and the corresponding prim on an object.
• Replaced all the code that used the sit target parent rather than the avatar parent to identify where an avatar was seated (e.g. on crossing).
• Added support for preserving AaaP/legacy mode for a seated avatar across region crossings. This was done in such a way that should give us "old-region to new-region" compatibility during the rollout, but not "new-region to old-region" (avatars will revert to legacy mode if crossing into a region which has not been upgraded yet), although there probably won't be any objects expecting the new behavior until after the rollout completes anyway (except on the InWorldz Sandbox regions).
• When downgrading a full agent to child agent (crossing away from the current region), the region now saves the former position as the recovery location for reentry failures rather than 0,0,0. Also sets the avatar parent position to 0,0,0 within the lock when clearing the parent prim. This should avoid some crossing failures putting the avatar at 0,0,0 if unseated.
• The CompleteMovement packet no longer overrides the position if there is a parent prim, if the avatar is in AaaP mode, or if the requested sit target ID is zero.
• The avatar "Reset" method no longer sets the absolute position to 128, 128, 70 since that had all kinds of unintended side-effects.
• An avatar's child agent position update now finishes updating the avatar position before calling the object culling code to check for distant entities to show. This may fix some strange quirks with drawing far objects rather than near objects, depending on your position in the region.
• The code that grabs an avatar data is now much more careful to grab consistent data (inside a position info lock), and reorder some of the other assignments for maximum safety and consistency.
• When sending an avatar state to another region, SendChildAgentUpdate2 only updates (overrides) the position if there is no "ride-on part" and no longer ever updates the data indicating which prim the avatar is seated upon variables. (i.e. The code has been simplified to avoid problems.)
• Fixed duplicate CHANGED_LINK messages although these were likely a regression in the code changes above. Moved the event sending from the prim to the object since we need to do it all once per object.
• Major reworking of the sit target handling. The object now tracks a list of specific sit targets, fixes logic, also much more efficient Order(1) operations instead of requiring Order(N) searches of all prims in an object in some (but not all) cases. We may be able to do more there as well, but mostly just making it work in this update and improving the obvious inefficiencies. The sit target changes handle link/unlink/take/rez/crossings/restarts etc.