From 5248c18b7db3ef7aa35f90615ed50f822fcf5878 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Wed, 6 Aug 2008 14:46:38 +0000 Subject: [PATCH] From: alan webb This fixes a sitting problem which popped up on loading regions from archive and turned out to be caused by the fact that the archiving mechanisms all preserve the sit-target information that is set in the object at the time the image is captured. This caused the new region to pick a sit-target prim that did not correspond to the prim on which the script was running, so the script's changed event is driven with an invalid avatar UUID. I have modified the ArchiveReadRequest class so that any sit information that survives the archiving process is deleted before the object is instantiated. This change has just been checked in. --- .../Environment/Modules/World/Archiver/ArchiveReadRequest.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 1e38cd6d03..b0e5f96cce 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs @@ -30,6 +30,7 @@ using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Modules.World.Serialiser; using OpenSim.Region.Environment.Modules.World.Terrain; using System; +using Axiom.Math; using System.Collections.Generic; using System.IO; using System.IO.Compression; @@ -135,6 +136,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver part.CreatorID = masterAvatarId; part.OwnerID = masterAvatarId; part.LastOwnerID = masterAvatarId; + // And zap any troublesome sit target information + part.SitTargetOrientation = new Quaternion(0,0,0,1); + part.SitTargetPosition = new Vector3(0,0,0); } if (m_scene.AddRestoredSceneObject(sceneObject, true, false))