aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-04 22:55:52 +0000
committerTeravus Ovares2008-05-04 22:55:52 +0000
commit7b446aba9174aac68c62ec40c2115a1e1f012191 (patch)
treec30d8ef2bf6c3e66f5601043352accbe4613c669 /OpenSim
parentUpdate svn properties. (diff)
downloadopensim-SC-7b446aba9174aac68c62ec40c2115a1e1f012191.zip
opensim-SC-7b446aba9174aac68c62ec40c2115a1e1f012191.tar.gz
opensim-SC-7b446aba9174aac68c62ec40c2115a1e1f012191.tar.bz2
opensim-SC-7b446aba9174aac68c62ec40c2115a1e1f012191.tar.xz
* Implemented DIE_AT_EDGE and Temporary objects don't save to the database.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLDataStore.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs19
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs13
6 files changed, 58 insertions, 6 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index 44bc660..125501b 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -152,7 +152,9 @@ namespace OpenSim.Data.MSSQL
152 { 152 {
153 foreach (SceneObjectPart prim in obj.Children.Values) 153 foreach (SceneObjectPart prim in obj.Children.Values)
154 { 154 {
155 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0) 155 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0
156 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0
157 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0)
156 { 158 {
157 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); 159 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
158 addPrim(prim, obj.UUID, regionUUID); 160 addPrim(prim, obj.UUID, regionUUID);
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index c3fe332..ac0d382 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -254,7 +254,9 @@ namespace OpenSim.Data.MySQL
254 { 254 {
255 foreach (SceneObjectPart prim in obj.Children.Values) 255 foreach (SceneObjectPart prim in obj.Children.Values)
256 { 256 {
257 if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0) 257 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0
258 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0
259 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0)
258 { 260 {
259 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); 261 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
260 addPrim(prim, obj.UUID, regionUUID); 262 addPrim(prim, obj.UUID, regionUUID);
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index b648ee8..f1694ca 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -183,7 +183,9 @@ namespace OpenSim.Data.SQLite
183 { 183 {
184 foreach (SceneObjectPart prim in obj.Children.Values) 184 foreach (SceneObjectPart prim in obj.Children.Values)
185 { 185 {
186 if ((prim.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Physics) == 0) 186 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0
187 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0
188 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0)
187 { 189 {
188 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID); 190 m_log.Info("[REGION DB]: Adding obj: " + obj.UUID + " to region: " + regionUUID);
189 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); 191 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
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
1352 1352
1353 public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp) 1353 public void CrossPrimGroupIntoNewRegion(LLVector3 position, SceneObjectGroup grp)
1354 { 1354 {
1355 if (grp == null)
1356 return;
1357 if (grp.RootPart == null)
1358 return;
1359
1360 if (grp.RootPart.DIE_AT_EDGE)
1361 {
1362 // We remove the object here
1363 try
1364 {
1365 DeleteSceneObjectGroup(grp);
1366 }
1367 catch (Exception)
1368 {
1369 m_log.Warn("[DATABASE]: exception when trying to remove the prim that crossed the border.");
1370 }
1371 return;
1372 }
1373
1355 m_log.Warn("Prim crossing: " + grp.UUID.ToString()); 1374 m_log.Warn("Prim crossing: " + grp.UUID.ToString());
1356 int thisx = (int)RegionInfo.RegionLocX; 1375 int thisx = (int)RegionInfo.RegionLocX;
1357 int thisy = (int)RegionInfo.RegionLocY; 1376 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
101 [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); 101 [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>();
102 [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0; 102 [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0;
103 [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; 103 [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None;
104 [XmlIgnore] public bool DIE_AT_EDGE = false;
104 105
105 106
106 [XmlIgnore] public bool m_IsAttachment = false; 107 [XmlIgnore] public bool m_IsAttachment = false;
@@ -2733,6 +2734,25 @@ namespace OpenSim.Region.Environment.Scenes
2733 //} 2734 //}
2734 2735
2735 } 2736 }
2737
2738 public void SetDieAtEdge(bool p)
2739 {
2740 if (m_parentGroup == null)
2741 return;
2742 if (m_parentGroup.RootPart == null)
2743 return;
2744
2745 m_parentGroup.RootPart.DIE_AT_EDGE = p;
2746 }
2747 public bool GetDieAtEdge()
2748 {
2749 if (m_parentGroup == null)
2750 return false;
2751 if (m_parentGroup.RootPart == null)
2752 return false;
2753
2754 return m_parentGroup.RootPart.DIE_AT_EDGE;
2755 }
2736 } 2756 }
2737 2757
2738} 2758}
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 7649ff3..f0108f8 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -844,7 +844,10 @@ namespace OpenSim.Region.ScriptEngine.Common
844 } 844 }
845 if ((status & BuiltIn_Commands_BaseClass.STATUS_DIE_AT_EDGE) == BuiltIn_Commands_BaseClass.STATUS_DIE_AT_EDGE) 845 if ((status & BuiltIn_Commands_BaseClass.STATUS_DIE_AT_EDGE) == BuiltIn_Commands_BaseClass.STATUS_DIE_AT_EDGE)
846 { 846 {
847 NotImplemented("llSetStatus - STATUS_DIE_AT_EDGE"); 847 if (value == 1)
848 m_host.SetDieAtEdge(true);
849 else
850 m_host.SetDieAtEdge(false);
848 } 851 }
849 if ((status & BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE) == BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE) 852 if ((status & BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE) == BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE)
850 { 853 {
@@ -890,8 +893,12 @@ namespace OpenSim.Region.ScriptEngine.Common
890 NotImplemented("llGetStatus - STATUS_BLOCK_GRAB"); 893 NotImplemented("llGetStatus - STATUS_BLOCK_GRAB");
891 return 0; 894 return 0;
892 case BuiltIn_Commands_BaseClass.STATUS_DIE_AT_EDGE: 895 case BuiltIn_Commands_BaseClass.STATUS_DIE_AT_EDGE:
893 NotImplemented("llGetStatus - STATUS_DIE_AT_EDGE"); 896
894 return 0; 897 if (m_host.GetDieAtEdge())
898 return 1;
899 else
900 return 0;
901
895 case BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE: 902 case BuiltIn_Commands_BaseClass.STATUS_RETURN_AT_EDGE:
896 NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE"); 903 NotImplemented("llGetStatus - STATUS_RETURN_AT_EDGE");
897 return 0; 904 return 0;