Skip to content

Hypergrid Teleport

lickx edited this page Aug 24, 2024 · 28 revisions

Upstream incorrectly handles attachments for incoming hypergrid visitors.

I fixed this in OpenSim/lickx. On this page I show what happens when teleporting to a region that runs OpenSim/lickx.

(NB. If the destination and departure region are both in the same foreign grid, that foreign grid handles the entity transfer as it is a local teleport (EntityTransfer.cs))

If the destination region is in a different grid than the departure grid (HGEntityTransfer.cs):

    1. All wearable textures, and any assets (sounds, animations, textures etc) on or inside (object contents) attachments are downloaded. The user is informed their assets are being transferred by means of a temporary pop-up.
    1. The downloaded assets are checked against duplicates and not stored again if duplicate (grid using FSAssets)
    1. LSL scripts are compiled into object code of the ScriptEngine that the destination region uses
    1. Attachments are set to the group (or none) you have active for this particular grid
    1. Scripts are loaded, event handlers (such as touch_end) connected and the state (memory) of the scripts are being restored
    1. Finally, scripts are set to resume their running state. The user will get a clickable popup informing that the HG transfer is complete. The avi is no longer a system avatar (ruth1), but fully visible including rigged mesh attachments with any worn scripts resumed.

On slow destination grids (such as OsGrid), step i. and ii. can take a few minutes, but will complete eventually. Assets are transferred one for one, not multi-threaded.

If the destination region doesn't run our fork, attachments are not set to the group the user has active for that grid. Scripts that rely on llSameGroup() can then show unreliable behaviour.

Mainstream OpenSim executes i., ii., and iii. partially, and doesn't execute step iv., v, and vi. at all, resulting in nonfunctional attachments. You would appear fully rendered including attachments, but scripts wouldn't run; the script assets never got transferred because the sim prematurely ended the asset transfers because it thinks root agent = done. This is also the reason why an AO HUD would stop working. If this happened, then whenever scripts would get the chance to run again (by a local crossing, local teleport or a HG teleport back to the home grid), scripts would start from zero with all memory lost.

So far only this fork has this bug fixed. That 'just' leaves 99.999999% of the rest of the hypergrid broken. But at least hypergrid visitors to our sims will have a pleasant experience.

Clone this wiki locally