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

WARNING!
After release of this update, a serious regression was found in the code that persists the sit targets assigned to prims, that can cause those sit target settings to be lost after a region restart. Please do not download this version.

A Halcyon 0.9.30 update is now available to correct this, and should be used in all cases instead of this version.

Overview

The focus of this update has been on crossings reliability, and also the start of a new round of work on crossing performance. The update also includes some followup fixes and improvements to the seated avatar work in the previous release, as well as several exciting new LSL functions.

CROSSINGS

  • [Reliability and performance] Experimental changes to crossings, where the destination region confirms the crossing, rather than the users' viewer(s). Instead of waiting for the crossing completion packet from the viewer, the destination region itself confirms the crossing to the originating region, immediately, if entry is allowed for the avatar(s) and any object sat upon, and the region has upgraded the avatar to root/full agent. Fixes several crossing failures and timeouts.
  • [Reliability] Fixed to make sure the agent (avatar) is only released from the original region once. There's a race between a fast viewer response and the region server response. The region will almost always come in first, but on a local test server it might not, or perhaps if the server was under load. It was seen a couple of times during local Dev testing. Solution: grab any non-null callback URI in a lock and clear the lock when grabbed.
  • [Reliability] Fixed a deadlock regression seen on InWorldz Sandbox 1 during developer testing there. There was a very long "position info" lock that included some heavy calls that included nested locks. This is contrary to position info locks being very brief, leaf locks. Those calls have been pulled out of the lock and minimized it to position-related code only.
  • [Reliability] Fixed it so that flying avatars cannot bounce back into previous region on corner crossings. Avoids the case where bounce-back during a corner crossing puts you in a seemingly random location.
  • [Reliability] Fixed the "connection established" check to directly use the destination region from the transit arguments where possible. Avoids a consistency ambiguity and eliminates an error case.
  • [Reliability] Also reverted to the original [i]full [/i] "connections established" check rather than only checking the destination region. On further discussions with Tranq, and after considering alternatives (such as the destination region sending enable/disable for whole chain of crossings), we cannot allow an avatar to initiate a new crossing while connections are still being established. The chronological order must be preserved, especially given the possibility of reentry into a region, and we cannot ensure that one an avatar leaves the region. It's a shame that we need to block and wait for more than just the destination region, but it is what it is, the alternatives are worse. We may revisit this if we can come up with new approaches to avoid waiting for all (up to 24) neighbor regions to establish connections.
  • [Reliability] Fixed to not allow a prim crossing to even be [i]started[/i] if seated avatars weren't yet in the region. These are the same pre-checks that were done later on each avatar, [i]after[/i] the object was already committed to leave the region (or had). This one fixes several crossing failures.
  • [Performance] One case of mesh loading wasn't passing the prim name, so performance reports could not report it. Fixing this may help track down the source of the high CPU usage on crossings.
  • [Performance] Added a diagnostic to report which objects are tying up the CPU the longest. Useful for identifying which objects are giving us the most trouble on crossings.
  • [Performance] Added crossing performance messages to the log and also to the user if the /!debug crossings command is provided in a local chat command to the server.
  • [Performance] Added the ability to actually toggle /!debug crossings and preserve that status on crossings.
  • [Performance] Mostly for tracking down crossing-related CPU usage, but general support for reporting operations if slow has been added, and diagnostics to report slow/inefficient operations in when applying physics to a new object in a region.

Sit Targets / Prims / Seated Avatars

  • [Reliability] Fixed a problem where a new call to llSitTarget was clearing the reference to any avatar that was still seated. This was causing llAvatarOnSitTarget to return a NULL_KEY if called, even while an avatar was seated, if llSitTarget was called while the avatar was seated.
  • [Cleanup] This shouldn't have any real affect on scripts, but is a good cleanup: Replaced code in several places that would fetch any prim, with a new more efficient and simpler code that specifically fetches a sit target. Also, in some legacy cases the seated avatar's visual parent is wanted (e.g. for updates of seated avatars), but in some cases (LSL scripting) the original sat-upon prim is often wanted (e.g. for runtime permissions checks for scripts). This is an attempt to differentiate more obviously in the code between the two different usage patterns. The most obvious place where this would mattered was in scripted checks for implicit permissions which could cause those implicit permissions to apply only to scripts in the root prim, however in that case the prim owner is checked, which should be the same for the child part and the root prim. The other place was in llPushObject where the position would have been incorrect for the seated avatar, but that wouldn't matter in llPushObject for a seated avatar.

New LSL functionality
For InWorldz-specific functions, more documentation will be provided very soon:

  • Implemented llGetAttachedList as per SL. See llGetAttachedList for more. Note: the LL documentation appears to be incorrect; it returns "NOT FOUND" for all error cases (it does not return "NOT ON REGION" for avatars in neighbor regions). The Halcyon implementation matches the SL behavior (not the docs).
  • Implemented llTransferLindenDollars, including support for transaction_result events. See llTransferLindenDollars and transaction_result for more.
  • Implemented iwGiveMoney and factored the code that is common with llTransferLindenDollars. The main difference is that iwGiveMoney does not require (or generate) a transaction_result event, but returns the transaction ID from the transaction history directly, or one of the error tags on an error (both as strings). Note: The transaction ID when transferring to yourself is always "0" as it is not logged in the transaction history. It should be considered an error case if ((result != "0") && ((integer)result == 0) i.e. not a number. The new function is defined as:
string iwGiveMoney(key destination, integer amount)
  • Added support for stand targets and LSL functions: iwStandTarget and iwLinkStandTarget. The new functions are defined as:
iwStandTarget(vector offset, rotation rot)
iwLinkStandTarget(integer link, vector offset, rotation rot)
  • Added stubs for llReturnObjectsByOwner and llReturnObjectsByID, as well as PERMISSION_RETURN_OBJECTS, and the other constants documented for those functions. Work is 80% complete, however it is unlikely to be completed in time for this release, so at this time they always return ERR_GENERIC. (We'll try to complete this for the 0.9.30 update, but at this time everything should compile but return an error.)

Other Behavior Change

  • Changed parcel bans to not be enforced for Estate Managers. Fixes Mantis 3249 as discussed earlier.
  • Also prevent Estate Managers from being banned from that estate, but allow removal of bans (even for EO or EM). The latter also allows cleanup in the event that the EO/EM changes after the ban list is in place.
  • Changes to match SL's banned parcel implementation, as outlined in Mantis 3250. The minimum height over a parcel where avatar is in the ban list is now 5000m above the terrain height (the new limit is much higher). The minimum height over a parcel with "Public access" disabled is now 50m above the terrain height (generally lower than it was). It used to be a fixed 100m in InWorldz for both of those cases. This also required splitting the constant value into two different values, and adding code to determine which case applied.
  • Fixed runtime permissions to avoid changing to 0 when a new permissions popup is sent to the user. (It needs to only be updated on the response (which it is already doing), or if there is nobody present to respond (as per SL). Fixes Mantis 3255.
  • Fixed some confusion in the code over script (runtime perms) answer handling. The script answer handler was not cleared if a new avatar was targeted for a permissions check. Then the test for existing request was comparing two different kinds of objects for equality, which may have resulted in trying to add the same handlers repeatedly, every time a new runtime permissions prompt was issued. The negative effects of this are not clear, but the problem code has been fixed.
  • Fixed a shallow copy (reference copying) in region objects. Changes to things like sit target lists (e.g. llSitTarget), or LSL scripted targets (e.g. llTarget), bounding boxes, and other references in one copy of an object affected all copies of that object that were shift-copied. This resulted in @mdickson's report of sit targets being cleared in the original after a shift-copy, and is probably responsible for some of the LSL target-related bugs, as well as other object "quantum entanglement" reports. (All known cases are now fixed.)

Halcyon Open-Source Servers

  • Fixed missing Initialize call for loading load asset XML files. If config isn't passed in, _settings is null and LoadDefaultAssets is not called to load the XML files from the assets subfolder. This should have no effect on InWorldz since it refers to default assets already applied to the asset server, however it may help new Halcyon installations elsewhere.
  • Made a simple change to be able to mark the default assets as loaded. This should dramatically speed up relaunch times at Halcyon sites that were not storing assets on Stratus (Rackspace CloudFiles), which is probably all non-InWorldz sites. If you are operating an existing grid and don't want the default assets being loaded, simply create a new file in the assets folder named AssetSets.xml.loaded.
  • Add sample Aperture config for Halcyon sites.
  • Add section to Halcyon.sample.ini for Stratus assets support.
  • Update the WHIP assets client to fix shutdown on MONO.
  • WHIP client rebuilt for .NET 4.5
  • [Cleanup] Removed some unused URI-related profile code. After noticing some problems with them during a code review of profile functions, rather than fixing these, this code appears to be completely unused, so removing the problematic code instead.

More on the new LSL functions
Here's a quick summary of the functions added, some of which exist in SL:

string iwGiveMoney(key destination, integer amount)
Similar to llTransferLindenDollars. Directly returns the transaction ID for the success or failure of a money transfer. If the transaction is successful, it returns the actual transaction ID that will show in the transaction history. If the transaction fails, or an error tag on error, e.g. "MISSING_PERMISSION_DEBIT".

iwStandTarget(vector offset, rotation rot)
Specifies the location, relative to the current prim, for a seated avatar to be placed when they stand up. The offset and rot parameters are relative to the seated prim. Note: the rotation parameter is currently not supported but is present for future-compatible use.

iwLinkStandTarget(integer link, vector offset, rotation rot)
Specifies the location, relative to the specified prim, for a seated avatar to be placed when they stand up. Note: the rotation parameter is currently not supported but is present for future-compatible use. This is the "link" version of the iwStandTarget function above.

This last two are particular useful when a physical object is sat upon (e.g. vehicles), to avoid the physical collisions when standing. It's also useful when it is more realistic to specify a location other than "on top" of the prim, such as standing up a seated avatar in front of a chair or couch (rather than on top). Automobiles are another example, where you could have 4 avatars seated in a car end up standing up on the other side of their nearest door, rather than on top of the vehicle (or in it, if phantom). The same thing applies to furniture such as beds, with a left or right side as the more logical stand position. Since the position is relative. These functions may also be useful for cases where an object is hollow and the region server wants to place the avatar on top of the prim rather than inside when standing.

Note: If a stand target is specified, it is used on a Stand Up (even if there is a sit target). It is specifically provided as a way to script an override for the default behavior. It is defined like a sit target, in terms of ZERO_VECTOR, ZERO_ROTATION meaning that no stand target is set.


WARNING
After release of this update, a serious regression was found in the code that persists the sit targets assigned to prims, that can cause those sit target settings to be lost after a region restart. Please do not download this version. A 0.9.30 version will be available soon that should correct this.