aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-18 05:51:36 +0000
committerMelanie Thielker2008-10-18 05:51:36 +0000
commitefe3f3eb2a0a31b1da474974c7d8193c2b28e13f (patch)
treedf1d30ad2f9230ea4e8fbfd1e6368d539600c785 /OpenSim/Region/Environment/Scenes/Scene.cs
parent* Fix an over compensation for bounciness on flat Primitive (diff)
downloadopensim-SC_OLD-efe3f3eb2a0a31b1da474974c7d8193c2b28e13f.zip
opensim-SC_OLD-efe3f3eb2a0a31b1da474974c7d8193c2b28e13f.tar.gz
opensim-SC_OLD-efe3f3eb2a0a31b1da474974c7d8193c2b28e13f.tar.bz2
opensim-SC_OLD-efe3f3eb2a0a31b1da474974c7d8193c2b28e13f.tar.xz
Megapatch. :) Fix skull attachment editing. Streamline Object terse updates.
Add rezzing time to objects. Add Object return and traffic fields to land database. Add plumbing for auto return. Implement auto return. Contains a migration. May contain nuts.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 299d0da..139281d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -96,6 +96,8 @@ namespace OpenSim.Region.Environment.Scenes
96 private int m_incrementsof15seconds = 0; 96 private int m_incrementsof15seconds = 0;
97 private volatile bool m_backingup = false; 97 private volatile bool m_backingup = false;
98 98
99 private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>();
100
99 protected string m_simulatorVersion = "OpenSimulator Server"; 101 protected string m_simulatorVersion = "OpenSimulator Server";
100 102
101 protected ModuleLoader m_moduleLoader; 103 protected ModuleLoader m_moduleLoader;
@@ -929,8 +931,54 @@ namespace OpenSim.Region.Environment.Scenes
929 /// <returns></returns> 931 /// <returns></returns>
930 public void Backup() 932 public void Backup()
931 { 933 {
934 m_returns.Clear();
935
932 EventManager.TriggerOnBackup(m_storageManager.DataStore); 936 EventManager.TriggerOnBackup(m_storageManager.DataStore);
933 m_backingup = false; 937 m_backingup = false;
938
939 foreach (KeyValuePair<UUID, ReturnInfo> ret in m_returns)
940 {
941 UUID transaction = UUID.Random();
942
943 GridInstantMessage msg = new GridInstantMessage();
944 msg.fromAgentID = new Guid(UUID.Zero.ToString()); // From server
945 msg.fromAgentSession = new Guid(transaction.ToString());
946 msg.toAgentID = new Guid(ret.Key.ToString());
947 msg.imSessionID = new Guid(transaction.ToString());
948 msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
949 msg.fromAgentName = "Server";
950 msg.dialog = (byte)19; // Object msg
951 msg.fromGroup = false;
952 msg.offline = (byte)1;
953 msg.ParentEstateID = RegionInfo.EstateSettings.ParentEstateID;
954 msg.Position = Vector3.Zero;
955 msg.RegionID = RegionInfo.RegionID.Guid;
956 msg.binaryBucket = new byte[0];
957 if (ret.Value.count > 1)
958 msg.message = string.Format("Your {0} objects were returned from {1} in region {2} due to parcel auto return", ret.Value.count, ret.Value.location.ToString(), RegionInfo.RegionName);
959 else
960 msg.message = string.Format("Your object {0} was returned from {1} in region {2} due to parcel auto return", ret.Value.objectName, ret.Value.location.ToString(), RegionInfo.RegionName);
961
962 TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
963 }
964 }
965
966 public void AddReturn(UUID agentID, string objectName, Vector3 location)
967 {
968 if (m_returns.ContainsKey(agentID))
969 {
970 ReturnInfo info = m_returns[agentID];
971 info.count++;
972 m_returns[agentID] = info;
973 }
974 else
975 {
976 ReturnInfo info = new ReturnInfo();
977 info.count = 1;
978 info.objectName = objectName;
979 info.location = location;
980 m_returns[agentID] = info;
981 }
934 } 982 }
935 983
936 #endregion 984 #endregion
@@ -2254,6 +2302,7 @@ namespace OpenSim.Region.Environment.Scenes
2254 client.OnUndo += m_innerScene.HandleUndo; 2302 client.OnUndo += m_innerScene.HandleUndo;
2255 client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate; 2303 client.OnObjectGroupRequest += m_innerScene.HandleObjectGroupUpdate;
2256 client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel; 2304 client.OnParcelReturnObjectsRequest += LandChannel.ReturnObjectsInParcel;
2305 client.OnParcelSetOtherCleanTime += LandChannel.SetParcelOtherCleanTime;
2257 client.OnObjectSaleInfo += ObjectSaleInfo; 2306 client.OnObjectSaleInfo += ObjectSaleInfo;
2258 client.OnScriptReset += ProcessScriptReset; 2307 client.OnScriptReset += ProcessScriptReset;
2259 client.OnGetScriptRunning += GetScriptRunning; 2308 client.OnGetScriptRunning += GetScriptRunning;