From 0d17ba2a76d4eb01f0bd6097c3974cd9d9fb2061 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 6 Nov 2008 22:21:25 +0000 Subject: * refactor: Attach a scene object to a scene separately from its construction --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index fb9c29c..db4ab52 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -1107,20 +1107,22 @@ namespace OpenSim.Region.Environment.Scenes //proxy.PCode = (byte)PCode.ParticleSystem; uint nextUUID = m_scene.NextLocalId; - proxyObjectGroup = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, UUID, nextUUID, Pos, Rotation, proxy); - if (proxyObjectGroup != null) - { + proxyObjectGroup = new SceneObjectGroup(UUID, nextUUID, Pos, Rotation, proxy); + proxyObjectGroup.AttachToScene(m_scene); + + // Commented out this code since it could never have executed, but might still be informative. +// if (proxyObjectGroup != null) +// { proxyObjectGroup.SendGroupFullUpdate(); remote_client.SendSitResponse(proxyObjectGroup.UUID, Vector3.Zero, Quaternion.Identity, true, Vector3.Zero, Vector3.Zero, false); m_scene.DeleteSceneObject(proxyObjectGroup); - } - else - { - m_autopilotMoving = false; - m_autoPilotTarget = Vector3.Zero; - ControllingClient.SendAlertMessage("Autopilot cancelled"); - } - +// } +// else +// { +// m_autopilotMoving = false; +// m_autoPilotTarget = Vector3.Zero; +// ControllingClient.SendAlertMessage("Autopilot cancelled"); +// } } private void CheckAtSitTarget() -- cgit v1.1