From 7b446aba9174aac68c62ec40c2115a1e1f012191 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 4 May 2008 22:55:52 +0000 Subject: * Implemented DIE_AT_EDGE and Temporary objects don't save to the database. --- OpenSim/Region/Environment/Scenes/Scene.cs | 19 +++++++++++++++++++ OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 3cc2cbc..33a9102 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1352,6 +1352,25 @@ namespace OpenSim.Region.Environment.Scenes public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) { + if (grp == null) + return; + if (grp.RootPart == null) + return; + + if (grp.RootPart.DIE_AT_EDGE) + { + // We remove the object here + try + { + DeleteSceneObjectGroup(grp); + } + catch (Exception) + { + m_log.Warn("[DATABASE]: exception when trying to remove the prim that crossed the border."); + } + return; + } + m_log.Warn("Prim crossing: " + grp.UUID.ToString()); int thisx = (int)RegionInfo.RegionLocX; int thisy = (int)RegionInfo.RegionLocY; diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 9b4f9af..9311904 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -101,6 +101,7 @@ namespace OpenSim.Region.Environment.Scenes [XmlIgnore] private Dictionary m_scriptEvents = new Dictionary(); [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0; [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; + [XmlIgnore] public bool DIE_AT_EDGE = false; [XmlIgnore] public bool m_IsAttachment = false; @@ -2733,6 +2734,25 @@ namespace OpenSim.Region.Environment.Scenes //} } + + public void SetDieAtEdge(bool p) + { + if (m_parentGroup == null) + return; + if (m_parentGroup.RootPart == null) + return; + + m_parentGroup.RootPart.DIE_AT_EDGE = p; + } + public bool GetDieAtEdge() + { + if (m_parentGroup == null) + return false; + if (m_parentGroup.RootPart == null) + return false; + + return m_parentGroup.RootPart.DIE_AT_EDGE; + } } } -- cgit v1.1