diff options
Diffstat (limited to 'OpenSim/Region')
43 files changed, 777 insertions, 531 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 09f7bea..e69e3fc 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -211,7 +211,17 @@ namespace OpenSim | |||
211 | else | 211 | else |
212 | { | 212 | { |
213 | string basepath = Path.GetFullPath(Util.configDir()); | 213 | string basepath = Path.GetFullPath(Util.configDir()); |
214 | string path = Path.Combine(basepath, file); | 214 | // Resolve relative paths with wildcards |
215 | string chunkWithoutWildcards = file; | ||
216 | string chunkWithWildcards = string.Empty; | ||
217 | int wildcardIndex = file.IndexOfAny(new char[] { '*', '?' }); | ||
218 | if (wildcardIndex != -1) | ||
219 | { | ||
220 | chunkWithoutWildcards = file.Substring(0, wildcardIndex); | ||
221 | chunkWithWildcards = file.Substring(wildcardIndex); | ||
222 | } | ||
223 | string path = Path.Combine(basepath, chunkWithoutWildcards); | ||
224 | path = Path.GetFullPath(path) + chunkWithWildcards; | ||
215 | string[] paths = Util.Glob(path); | 225 | string[] paths = Util.Glob(path); |
216 | foreach (string p in paths) | 226 | foreach (string p in paths) |
217 | { | 227 | { |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index cb48ac1..bbc42e6 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -418,7 +418,7 @@ namespace OpenSim | |||
418 | { | 418 | { |
419 | MainConsole.Instance.Output( | 419 | MainConsole.Instance.Output( |
420 | String.Format( | 420 | String.Format( |
421 | "Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}", | 421 | "Kicking user: {0,-16} {1,-16} {2,-37} in region: {3,-16}", |
422 | presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName)); | 422 | presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName)); |
423 | 423 | ||
424 | // kick client... | 424 | // kick client... |
@@ -530,7 +530,10 @@ namespace OpenSim | |||
530 | regionFile = cmd[3]; | 530 | regionFile = cmd[3]; |
531 | 531 | ||
532 | IScene scene; | 532 | IScene scene; |
533 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source), true, out scene); | 533 | RegionInfo regInfo = new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source); |
534 | PopulateRegionEstateInfo(regInfo); | ||
535 | CreateRegion(regInfo, true, out scene); | ||
536 | regInfo.EstateSettings.Save(); | ||
534 | } | 537 | } |
535 | else if (cmd[3].EndsWith(".ini")) | 538 | else if (cmd[3].EndsWith(".ini")) |
536 | { | 539 | { |
@@ -541,7 +544,10 @@ namespace OpenSim | |||
541 | regionFile = cmd[3]; | 544 | regionFile = cmd[3]; |
542 | 545 | ||
543 | IScene scene; | 546 | IScene scene; |
544 | CreateRegion(new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source, cmd[2]), true, out scene); | 547 | RegionInfo regInfo = new RegionInfo(cmd[2], regionFile, false, ConfigSource.Source, cmd[2]); |
548 | PopulateRegionEstateInfo(regInfo); | ||
549 | CreateRegion(regInfo, true, out scene); | ||
550 | regInfo.EstateSettings.Save(); | ||
545 | } | 551 | } |
546 | else | 552 | else |
547 | { | 553 | { |
@@ -861,7 +867,7 @@ namespace OpenSim | |||
861 | MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); | 867 | MainConsole.Instance.Output(String.Format("\nAgents connected: {0}\n", agents.Count)); |
862 | 868 | ||
863 | MainConsole.Instance.Output( | 869 | MainConsole.Instance.Output( |
864 | String.Format("{0,-16}{1,-16}{2,-37}{3,-11}{4,-16}{5,-30}", "Firstname", "Lastname", | 870 | String.Format("{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}", "Firstname", "Lastname", |
865 | "Agent ID", "Root/Child", "Region", "Position")); | 871 | "Agent ID", "Root/Child", "Region", "Position")); |
866 | 872 | ||
867 | foreach (ScenePresence presence in agents) | 873 | foreach (ScenePresence presence in agents) |
@@ -880,7 +886,7 @@ namespace OpenSim | |||
880 | 886 | ||
881 | MainConsole.Instance.Output( | 887 | MainConsole.Instance.Output( |
882 | String.Format( | 888 | String.Format( |
883 | "{0,-16}{1,-16}{2,-37}{3,-11}{4,-16}{5,-30}", | 889 | "{0,-16} {1,-16} {2,-37} {3,-11} {4,-16} {5,-30}", |
884 | presence.Firstname, | 890 | presence.Firstname, |
885 | presence.Lastname, | 891 | presence.Lastname, |
886 | presence.UUID, | 892 | presence.UUID, |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index fc67f94..c08da18 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -395,9 +395,13 @@ namespace OpenSim | |||
395 | scene.SnmpService.BootInfo("Creating region texture", scene); | 395 | scene.SnmpService.BootInfo("Creating region texture", scene); |
396 | } | 396 | } |
397 | 397 | ||
398 | // moved these here as the terrain texture has to be created after the modules are initialized | 398 | // moved these here as the map texture has to be created after the modules are initialized |
399 | // and has to happen before the region is registered with the grid. | 399 | // and has to happen before the region is registered with the grid. |
400 | scene.CreateTerrainTexture(); | 400 | IWorldMapModule mapModule = scene.RequestModuleInterface<IWorldMapModule>(); |
401 | if (mapModule != null) | ||
402 | mapModule.GenerateMaptile(); | ||
403 | else | ||
404 | m_log.WarnFormat("[STARTUP]: No map module available to generate map tile"); | ||
401 | 405 | ||
402 | // TODO : Try setting resource for region xstats here on scene | 406 | // TODO : Try setting resource for region xstats here on scene |
403 | MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); | 407 | MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); |
@@ -867,6 +871,60 @@ namespace OpenSim | |||
867 | { | 871 | { |
868 | regionnum = m_sceneManager.Scenes.Count; | 872 | regionnum = m_sceneManager.Scenes.Count; |
869 | } | 873 | } |
874 | |||
875 | /// <summary> | ||
876 | /// Load the estate information for the provided RegionInfo object. | ||
877 | /// </summary> | ||
878 | /// <param name="regInfo"> | ||
879 | /// A <see cref="RegionInfo"/> | ||
880 | /// </param> | ||
881 | public void PopulateRegionEstateInfo(RegionInfo regInfo) | ||
882 | { | ||
883 | if (m_storageManager.EstateDataStore != null) | ||
884 | { | ||
885 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false); | ||
886 | } | ||
887 | |||
888 | if (regInfo.EstateSettings.EstateID == 0) // No record at all | ||
889 | { | ||
890 | MainConsole.Instance.Output("Your region is not part of an estate."); | ||
891 | while (true) | ||
892 | { | ||
893 | string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"}); | ||
894 | if (response == "no") | ||
895 | { | ||
896 | // Create a new estate | ||
897 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true); | ||
898 | |||
899 | regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); | ||
900 | //regInfo.EstateSettings.Save(); | ||
901 | break; | ||
902 | } | ||
903 | else | ||
904 | { | ||
905 | response = MainConsole.Instance.CmdPrompt("Estate name to join", "None"); | ||
906 | if (response == "None") | ||
907 | continue; | ||
908 | |||
909 | List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response); | ||
910 | if (estateIDs.Count < 1) | ||
911 | { | ||
912 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); | ||
913 | continue; | ||
914 | } | ||
915 | |||
916 | int estateID = estateIDs[0]; | ||
917 | |||
918 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID); | ||
919 | |||
920 | if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID)) | ||
921 | break; | ||
922 | |||
923 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | ||
924 | } | ||
925 | } | ||
926 | } | ||
927 | } | ||
870 | } | 928 | } |
871 | 929 | ||
872 | 930 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 48465d9..d41df3d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -1442,16 +1442,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1442 | /// <summary> | 1442 | /// <summary> |
1443 | /// | 1443 | /// |
1444 | /// </summary> | 1444 | /// </summary> |
1445 | public void SendTeleportLocationStart() | 1445 | public void SendTeleportStart(uint flags) |
1446 | { | 1446 | { |
1447 | //TeleportStartPacket tpStart = (TeleportStartPacket)PacketPool.Instance.GetPacket(PacketType.TeleportStart); | 1447 | TeleportStartPacket tpStart = (TeleportStartPacket)PacketPool.Instance.GetPacket(PacketType.TeleportStart); |
1448 | TeleportStartPacket tpStart = new TeleportStartPacket(); | 1448 | //TeleportStartPacket tpStart = new TeleportStartPacket(); |
1449 | tpStart.Info.TeleportFlags = 16; // Teleport via location | 1449 | tpStart.Info.TeleportFlags = flags; //16; // Teleport via location |
1450 | 1450 | ||
1451 | // Hack to get this out immediately and skip throttles | 1451 | // Hack to get this out immediately and skip throttles |
1452 | OutPacket(tpStart, ThrottleOutPacketType.Unknown); | 1452 | OutPacket(tpStart, ThrottleOutPacketType.Unknown); |
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | public void SendTeleportProgress(uint flags, string message) | ||
1456 | { | ||
1457 | TeleportProgressPacket tpProgress = (TeleportProgressPacket)PacketPool.Instance.GetPacket(PacketType.TeleportProgress); | ||
1458 | tpProgress.AgentData.AgentID = this.AgentId; | ||
1459 | tpProgress.Info.TeleportFlags = flags; | ||
1460 | tpProgress.Info.Message = Util.StringToBytes256(message); | ||
1461 | |||
1462 | // Hack to get this out immediately and skip throttles | ||
1463 | OutPacket(tpProgress, ThrottleOutPacketType.Unknown); | ||
1464 | } | ||
1465 | |||
1455 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 1466 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) |
1456 | { | 1467 | { |
1457 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); | 1468 | MoneyBalanceReplyPacket money = (MoneyBalanceReplyPacket)PacketPool.Instance.GetPacket(PacketType.MoneyBalanceReply); |
@@ -3041,7 +3052,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3041 | { | 3052 | { |
3042 | OSDMap GroupDataMap = new OSDMap(6); | 3053 | OSDMap GroupDataMap = new OSDMap(6); |
3043 | OSDMap NewGroupDataMap = new OSDMap(1); | 3054 | OSDMap NewGroupDataMap = new OSDMap(1); |
3044 | GroupDataMap.Add("GroupPowers", OSD.FromBinary(m.GroupPowers)); | 3055 | GroupDataMap.Add("GroupPowers", OSD.FromULong(m.GroupPowers)); |
3045 | GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices)); | 3056 | GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices)); |
3046 | GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle)); | 3057 | GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle)); |
3047 | GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID)); | 3058 | GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID)); |
@@ -6332,7 +6343,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6332 | } | 6343 | } |
6333 | #endregion | 6344 | #endregion |
6334 | 6345 | ||
6335 | ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData; | 6346 | // ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData; |
6336 | 6347 | ||
6337 | ObjectDuplicate handlerObjectDuplicate = null; | 6348 | ObjectDuplicate handlerObjectDuplicate = null; |
6338 | 6349 | ||
@@ -11765,8 +11776,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11765 | { | 11776 | { |
11766 | StringBuilder sb = new StringBuilder(); | 11777 | StringBuilder sb = new StringBuilder(); |
11767 | sb.Append("["); | 11778 | sb.Append("["); |
11768 | if (this.priority != null) | 11779 | sb.Append(this.priority.ToString()); |
11769 | sb.Append(this.priority.ToString()); | ||
11770 | sb.Append(","); | 11780 | sb.Append(","); |
11771 | if (this.value != null) | 11781 | if (this.value != null) |
11772 | sb.Append(this.value.ToString()); | 11782 | sb.Append(this.value.ToString()); |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index e683821..46b68ec 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -58,6 +58,11 @@ namespace OpenSim.Region.ClientStack | |||
58 | 58 | ||
59 | protected StorageManager m_storageManager; | 59 | protected StorageManager m_storageManager; |
60 | 60 | ||
61 | public StorageManager StorageManager | ||
62 | { | ||
63 | get { return m_storageManager; } | ||
64 | } | ||
65 | |||
61 | protected ClientStackManager m_clientStackManager; | 66 | protected ClientStackManager m_clientStackManager; |
62 | 67 | ||
63 | public SceneManager SceneManager | 68 | public SceneManager SceneManager |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index a895d6e..032e55a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
93 | { | 93 | { |
94 | string deadAvatarMessage; | 94 | string deadAvatarMessage; |
95 | ScenePresence killingAvatar = null; | 95 | ScenePresence killingAvatar = null; |
96 | string killingAvatarMessage; | 96 | // string killingAvatarMessage; |
97 | 97 | ||
98 | if (killerObjectLocalID == 0) | 98 | if (killerObjectLocalID == 0) |
99 | deadAvatarMessage = "You committed suicide!"; | 99 | deadAvatarMessage = "You committed suicide!"; |
@@ -118,14 +118,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
118 | deadAvatarMessage = String.Format("You impaled yourself on {0} owned by {1}!", part.Name, deadAvatar.Scene.GetUserName(part.OwnerID)); | 118 | deadAvatarMessage = String.Format("You impaled yourself on {0} owned by {1}!", part.Name, deadAvatar.Scene.GetUserName(part.OwnerID)); |
119 | else | 119 | else |
120 | { | 120 | { |
121 | killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); | 121 | // killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); |
122 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); | 122 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); |
123 | } | 123 | } |
124 | } | 124 | } |
125 | } | 125 | } |
126 | else | 126 | else |
127 | { | 127 | { |
128 | killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); | 128 | // killingAvatarMessage = String.Format("You fragged {0}!", deadAvatar.Name); |
129 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); | 129 | deadAvatarMessage = String.Format("You got killed by {0}!", killingAvatar.Name); |
130 | } | 130 | } |
131 | } | 131 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 98545f9..4465e8a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -82,6 +82,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
82 | scene.EventManager.OnNewClient += OnNewClient; | 82 | scene.EventManager.OnNewClient += OnNewClient; |
83 | scene.EventManager.OnClientClosed += ClientLoggedOut; | 83 | scene.EventManager.OnClientClosed += ClientLoggedOut; |
84 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; | 84 | scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; |
85 | scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene; | ||
85 | } | 86 | } |
86 | 87 | ||
87 | public void RegionLoaded(Scene scene) | 88 | public void RegionLoaded(Scene scene) |
@@ -98,9 +99,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
98 | scene.EventManager.OnNewClient -= OnNewClient; | 99 | scene.EventManager.OnNewClient -= OnNewClient; |
99 | scene.EventManager.OnClientClosed -= ClientLoggedOut; | 100 | scene.EventManager.OnClientClosed -= ClientLoggedOut; |
100 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; | 101 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; |
102 | scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene; | ||
101 | } | 103 | } |
102 | } | 104 | } |
103 | |||
104 | } | 105 | } |
105 | 106 | ||
106 | public void RemoveRegion(Scene scene) | 107 | public void RemoveRegion(Scene scene) |
@@ -108,6 +109,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
108 | scene.EventManager.OnNewClient -= OnNewClient; | 109 | scene.EventManager.OnNewClient -= OnNewClient; |
109 | scene.EventManager.OnClientClosed -= ClientLoggedOut; | 110 | scene.EventManager.OnClientClosed -= ClientLoggedOut; |
110 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; | 111 | scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; |
112 | scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene; | ||
111 | m_Scenelist.Remove(scene); | 113 | m_Scenelist.Remove(scene); |
112 | } | 114 | } |
113 | 115 | ||
@@ -136,6 +138,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
136 | // Inventory giving is conducted via instant message | 138 | // Inventory giving is conducted via instant message |
137 | client.OnInstantMessage += OnInstantMessage; | 139 | client.OnInstantMessage += OnInstantMessage; |
138 | } | 140 | } |
141 | |||
142 | protected void OnSetRootAgentScene(UUID id, Scene scene) | ||
143 | { | ||
144 | m_AgentRegions[id] = scene; | ||
145 | } | ||
139 | 146 | ||
140 | private Scene FindClientScene(UUID agentId) | 147 | private Scene FindClientScene(UUID agentId) |
141 | { | 148 | { |
@@ -160,7 +167,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
160 | if (scene == null) // Something seriously wrong here. | 167 | if (scene == null) // Something seriously wrong here. |
161 | return; | 168 | return; |
162 | 169 | ||
163 | |||
164 | if (im.dialog == (byte) InstantMessageDialog.InventoryOffered) | 170 | if (im.dialog == (byte) InstantMessageDialog.InventoryOffered) |
165 | { | 171 | { |
166 | //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0])); | 172 | //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0])); |
@@ -348,11 +354,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
348 | } | 354 | } |
349 | } | 355 | } |
350 | 356 | ||
351 | public void SetRootAgentScene(UUID agentID, Scene scene) | ||
352 | { | ||
353 | m_AgentRegions[agentID] = scene; | ||
354 | } | ||
355 | |||
356 | public bool NeedSceneCacheClear(UUID agentID, Scene scene) | 357 | public bool NeedSceneCacheClear(UUID agentID, Scene scene) |
357 | { | 358 | { |
358 | if (!m_AgentRegions.ContainsKey(agentID)) | 359 | if (!m_AgentRegions.ContainsKey(agentID)) |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 1d1a0a1..0ba67d3 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -174,9 +174,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
174 | position.Z = newPosZ; | 174 | position.Z = newPosZ; |
175 | } | 175 | } |
176 | 176 | ||
177 | // Only send this if the event queue is null | 177 | sp.ControllingClient.SendTeleportStart(teleportFlags); |
178 | if (eq == null) | ||
179 | sp.ControllingClient.SendTeleportLocationStart(); | ||
180 | 178 | ||
181 | sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); | 179 | sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); |
182 | sp.Teleport(position); | 180 | sp.Teleport(position); |
@@ -257,9 +255,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
257 | 255 | ||
258 | ulong destinationHandle = finalDestination.RegionHandle; | 256 | ulong destinationHandle = finalDestination.RegionHandle; |
259 | 257 | ||
260 | if (eq == null) | ||
261 | sp.ControllingClient.SendTeleportLocationStart(); | ||
262 | |||
263 | // Let's do DNS resolution only once in this process, please! | 258 | // Let's do DNS resolution only once in this process, please! |
264 | // This may be a costly operation. The reg.ExternalEndPoint field is not a passive field, | 259 | // This may be a costly operation. The reg.ExternalEndPoint field is not a passive field, |
265 | // it's actually doing a lot of work. | 260 | // it's actually doing a lot of work. |
@@ -277,6 +272,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
277 | return; | 272 | return; |
278 | } | 273 | } |
279 | 274 | ||
275 | sp.ControllingClient.SendTeleportStart(teleportFlags); | ||
276 | |||
280 | // the avatar.Close below will clear the child region list. We need this below for (possibly) | 277 | // the avatar.Close below will clear the child region list. We need this below for (possibly) |
281 | // closing the child agents, so save it here (we need a copy as it is Clear()-ed). | 278 | // closing the child agents, so save it here (we need a copy as it is Clear()-ed). |
282 | //List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList()); | 279 | //List<ulong> childRegions = new List<ulong>(avatar.GetKnownRegionList()); |
@@ -307,7 +304,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
307 | string reason = String.Empty; | 304 | string reason = String.Empty; |
308 | 305 | ||
309 | // Let's create an agent there if one doesn't exist yet. | 306 | // Let's create an agent there if one doesn't exist yet. |
310 | if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason)) | 307 | bool logout = false; |
308 | if (!CreateAgent(sp, reg, finalDestination, agentCircuit, teleportFlags, out reason, out logout)) | ||
311 | { | 309 | { |
312 | sp.ControllingClient.SendTeleportFailed(String.Format("Destination refused: {0}", | 310 | sp.ControllingClient.SendTeleportFailed(String.Format("Destination refused: {0}", |
313 | reason)); | 311 | reason)); |
@@ -319,6 +317,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
319 | 317 | ||
320 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) | 318 | if (NeedsNewAgent(oldRegionX, newRegionX, oldRegionY, newRegionY)) |
321 | { | 319 | { |
320 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Creating agent..."); | ||
321 | |||
322 | #region IP Translation for NAT | 322 | #region IP Translation for NAT |
323 | IClientIPEndpoint ipepClient; | 323 | IClientIPEndpoint ipepClient; |
324 | if (sp.ClientView.TryGet(out ipepClient)) | 324 | if (sp.ClientView.TryGet(out ipepClient)) |
@@ -396,6 +396,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
396 | agent.Position = position; | 396 | agent.Position = position; |
397 | SetCallbackURL(agent, sp.Scene.RegionInfo); | 397 | SetCallbackURL(agent, sp.Scene.RegionInfo); |
398 | 398 | ||
399 | //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Updating agent..."); | ||
400 | |||
399 | if (!UpdateAgent(reg, finalDestination, agent)) | 401 | if (!UpdateAgent(reg, finalDestination, agent)) |
400 | { | 402 | { |
401 | // Region doesn't take it | 403 | // Region doesn't take it |
@@ -434,8 +436,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
434 | // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it | 436 | // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it |
435 | CrossAttachmentsIntoNewRegion(finalDestination, sp, true); | 437 | CrossAttachmentsIntoNewRegion(finalDestination, sp, true); |
436 | 438 | ||
439 | // Well, this is it. The agent is over there. | ||
440 | |||
437 | KillEntity(sp.Scene, sp.LocalId); | 441 | KillEntity(sp.Scene, sp.LocalId); |
438 | 442 | ||
443 | // May need to logout or other cleanup | ||
444 | AgentHasMovedAway(sp.ControllingClient.SessionId, logout); | ||
445 | |||
439 | // Now let's make it officially a child agent | 446 | // Now let's make it officially a child agent |
440 | sp.MakeChildAgent(); | 447 | sp.MakeChildAgent(); |
441 | 448 | ||
@@ -483,8 +490,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
483 | 490 | ||
484 | } | 491 | } |
485 | 492 | ||
486 | protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) | 493 | protected virtual bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) |
487 | { | 494 | { |
495 | logout = false; | ||
488 | return m_aScene.SimulationService.CreateAgent(finalDestination, agentCircuit, teleportFlags, out reason); | 496 | return m_aScene.SimulationService.CreateAgent(finalDestination, agentCircuit, teleportFlags, out reason); |
489 | } | 497 | } |
490 | 498 | ||
@@ -500,6 +508,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
500 | 508 | ||
501 | } | 509 | } |
502 | 510 | ||
511 | protected virtual void AgentHasMovedAway(UUID sessionID, bool logout) | ||
512 | { | ||
513 | } | ||
514 | |||
503 | protected void KillEntity(Scene scene, uint localID) | 515 | protected void KillEntity(Scene scene, uint localID) |
504 | { | 516 | { |
505 | scene.SendKillObject(localID); | 517 | scene.SendKillObject(localID); |
@@ -1286,18 +1298,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1286 | return handles; | 1298 | return handles; |
1287 | } | 1299 | } |
1288 | 1300 | ||
1289 | private void Dump(string msg, List<ulong> handles) | 1301 | // private void Dump(string msg, List<ulong> handles) |
1290 | { | 1302 | // { |
1291 | m_log.InfoFormat("-------------- HANDLE DUMP ({0}) ---------", msg); | 1303 | // m_log.InfoFormat("-------------- HANDLE DUMP ({0}) ---------", msg); |
1292 | foreach (ulong handle in handles) | 1304 | // foreach (ulong handle in handles) |
1293 | { | 1305 | // { |
1294 | uint x, y; | 1306 | // uint x, y; |
1295 | Utils.LongToUInts(handle, out x, out y); | 1307 | // Utils.LongToUInts(handle, out x, out y); |
1296 | x = x / Constants.RegionSize; | 1308 | // x = x / Constants.RegionSize; |
1297 | y = y / Constants.RegionSize; | 1309 | // y = y / Constants.RegionSize; |
1298 | m_log.InfoFormat("({0}, {1})", x, y); | 1310 | // m_log.InfoFormat("({0}, {1})", x, y); |
1299 | } | 1311 | // } |
1300 | } | 1312 | // } |
1301 | 1313 | ||
1302 | #endregion | 1314 | #endregion |
1303 | 1315 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 7d26e3f..1ac7508 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -140,9 +140,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
140 | return false; | 140 | return false; |
141 | } | 141 | } |
142 | 142 | ||
143 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason) | 143 | protected override void AgentHasMovedAway(UUID sessionID, bool logout) |
144 | { | ||
145 | if (logout) | ||
146 | // Log them out of this grid | ||
147 | m_aScene.PresenceService.LogoutAgent(sessionID); | ||
148 | } | ||
149 | |||
150 | protected override bool CreateAgent(ScenePresence sp, GridRegion reg, GridRegion finalDestination, AgentCircuitData agentCircuit, uint teleportFlags, out string reason, out bool logout) | ||
144 | { | 151 | { |
145 | reason = string.Empty; | 152 | reason = string.Empty; |
153 | logout = false; | ||
146 | int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID); | 154 | int flags = m_aScene.GridService.GetRegionFlags(m_aScene.RegionInfo.ScopeID, reg.RegionID); |
147 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) | 155 | if (flags == -1 /* no region in DB */ || (flags & (int)OpenSim.Data.RegionFlags.Hyperlink) != 0) |
148 | { | 156 | { |
@@ -152,9 +160,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
152 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); | 160 | string userAgentDriver = agentCircuit.ServiceURLs["HomeURI"].ToString(); |
153 | IUserAgentService connector = new UserAgentServiceConnector(userAgentDriver); | 161 | IUserAgentService connector = new UserAgentServiceConnector(userAgentDriver); |
154 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason); | 162 | bool success = connector.LoginAgentToGrid(agentCircuit, reg, finalDestination, out reason); |
155 | if (success) | 163 | logout = success; // flag for later logout from this grid; this is an HG TP |
156 | // Log them out of this grid | ||
157 | m_aScene.PresenceService.LogoutAgent(agentCircuit.SessionID); | ||
158 | 164 | ||
159 | return success; | 165 | return success; |
160 | } | 166 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index efa60bb..e9bcae3 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -54,12 +54,10 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
54 | } | 54 | } |
55 | 55 | ||
56 | private static byte[] uintToByteArray(uint uIntValue) | 56 | private static byte[] uintToByteArray(uint uIntValue) |
57 | { | 57 | { |
58 | byte[] resultbytes = Utils.UIntToBytes(uIntValue); | 58 | byte[] result = new byte[4]; |
59 | if (BitConverter.IsLittleEndian) | 59 | Utils.UIntToBytesBig(uIntValue, result, 0); |
60 | Array.Reverse(resultbytes); | 60 | return result; |
61 | |||
62 | return resultbytes; | ||
63 | } | 61 | } |
64 | 62 | ||
65 | public static OSD buildEvent(string eventName, OSD eventBody) | 63 | public static OSD buildEvent(string eventName, OSD eventBody) |
@@ -160,7 +158,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
160 | info.Add("SimAccess", OSD.FromInteger(simAccess)); | 158 | info.Add("SimAccess", OSD.FromInteger(simAccess)); |
161 | info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); | 159 | info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); |
162 | info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); | 160 | info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); |
163 | info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation | 161 | info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation |
164 | 162 | ||
165 | OSDArray infoArr = new OSDArray(); | 163 | OSDArray infoArr = new OSDArray(); |
166 | infoArr.Add(info); | 164 | infoArr.Add(info); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs index b13b9d8..ccb892e 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs | |||
@@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
95 | try | 95 | try |
96 | { | 96 | { |
97 | asset1.ID = url + "/" + asset.ID; | 97 | asset1.ID = url + "/" + asset.ID; |
98 | UUID temp = UUID.Zero; | 98 | // UUID temp = UUID.Zero; |
99 | // TODO: if the creator is local, stick this grid's URL in front | 99 | // TODO: if the creator is local, stick this grid's URL in front |
100 | //if (UUID.TryParse(asset.Metadata.CreatorID, out temp)) | 100 | //if (UUID.TryParse(asset.Metadata.CreatorID, out temp)) |
101 | // asset1.Metadata.CreatorID = ??? + "/" + asset.Metadata.CreatorID; | 101 | // asset1.Metadata.CreatorID = ??? + "/" + asset.Metadata.CreatorID; |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 8ccc941..c673b31 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -54,7 +54,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
54 | get { return m_assMapper; } | 54 | get { return m_assMapper; } |
55 | } | 55 | } |
56 | 56 | ||
57 | private bool m_Initialized = false; | 57 | // private bool m_Initialized = false; |
58 | 58 | ||
59 | #region INonSharedRegionModule | 59 | #region INonSharedRegionModule |
60 | 60 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 2517a23..cc12df0 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -572,7 +572,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
572 | } | 572 | } |
573 | if (attachment) | 573 | if (attachment) |
574 | { | 574 | { |
575 | group.RootPart.ObjectFlags |= (uint)PrimFlags.Phantom; | 575 | group.RootPart.Flags |= PrimFlags.Phantom; |
576 | group.RootPart.IsAttachment = true; | 576 | group.RootPart.IsAttachment = true; |
577 | } | 577 | } |
578 | 578 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs index 9c20d68..d570608 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
51 | private static bool m_HasRunOnce = false; | 51 | private static bool m_HasRunOnce = false; |
52 | 52 | ||
53 | private bool m_Enabled = false; | 53 | private bool m_Enabled = false; |
54 | private string m_LibraryName = "OpenSim Library"; | 54 | // private string m_LibraryName = "OpenSim Library"; |
55 | private Scene m_Scene; | 55 | private Scene m_Scene; |
56 | 56 | ||
57 | private ILibraryService m_Library; | 57 | private ILibraryService m_Library; |
@@ -212,13 +212,13 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | private void DumpLibrary() | 215 | // private void DumpLibrary() |
216 | { | 216 | // { |
217 | InventoryFolderImpl lib = m_Library.LibraryRootFolder; | 217 | // InventoryFolderImpl lib = m_Library.LibraryRootFolder; |
218 | 218 | // | |
219 | m_log.DebugFormat(" - folder {0}", lib.Name); | 219 | // m_log.DebugFormat(" - folder {0}", lib.Name); |
220 | DumpFolder(lib); | 220 | // DumpFolder(lib); |
221 | } | 221 | // } |
222 | // | 222 | // |
223 | // private void DumpLibrary() | 223 | // private void DumpLibrary() |
224 | // { | 224 | // { |
diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs new file mode 100644 index 0000000..b75a700 --- /dev/null +++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs | |||
@@ -0,0 +1,169 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.IO; | ||
31 | using System.Reflection; | ||
32 | using log4net; | ||
33 | using Mono.Addins; | ||
34 | using Nini.Config; | ||
35 | using OpenMetaverse; | ||
36 | using OpenMetaverse.Packets; | ||
37 | using OpenSim.Framework; | ||
38 | using OpenSim.Region.Framework; | ||
39 | using OpenSim.Region.Framework.Interfaces; | ||
40 | using OpenSim.Region.Framework.Scenes; | ||
41 | |||
42 | namespace OpenSim.Region.CoreModules.Avatar.Attachments | ||
43 | { | ||
44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BinaryLoggingModule")] | ||
45 | public class BinaryLoggingModule : INonSharedRegionModule | ||
46 | { | ||
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
49 | protected bool m_collectStats; | ||
50 | protected Scene m_scene = null; | ||
51 | |||
52 | public string Name { get { return "Binary Statistics Logging Module"; } } | ||
53 | public Type ReplaceableInterface { get { return null; } } | ||
54 | |||
55 | public void Initialise(IConfigSource source) | ||
56 | { | ||
57 | try | ||
58 | { | ||
59 | IConfig statConfig = source.Configs["Statistics.Binary"]; | ||
60 | if (statConfig.Contains("enabled") && statConfig.GetBoolean("enabled")) | ||
61 | { | ||
62 | if (statConfig.Contains("collect_region_stats")) | ||
63 | { | ||
64 | if (statConfig.GetBoolean("collect_region_stats")) | ||
65 | { | ||
66 | m_collectStats = true; | ||
67 | } | ||
68 | } | ||
69 | if (statConfig.Contains("region_stats_period_seconds")) | ||
70 | { | ||
71 | m_statLogPeriod = TimeSpan.FromSeconds(statConfig.GetInt("region_stats_period_seconds")); | ||
72 | } | ||
73 | if (statConfig.Contains("stats_dir")) | ||
74 | { | ||
75 | m_statsDir = statConfig.GetString("stats_dir"); | ||
76 | } | ||
77 | } | ||
78 | } | ||
79 | catch | ||
80 | { | ||
81 | // if it doesn't work, we don't collect anything | ||
82 | } | ||
83 | } | ||
84 | |||
85 | public void AddRegion(Scene scene) | ||
86 | { | ||
87 | m_scene = scene; | ||
88 | } | ||
89 | |||
90 | public void RemoveRegion(Scene scene) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | public void RegionLoaded(Scene scene) | ||
95 | { | ||
96 | if (m_collectStats) | ||
97 | m_scene.StatsReporter.OnSendStatsResult += LogSimStats; | ||
98 | } | ||
99 | |||
100 | public void Close() | ||
101 | { | ||
102 | } | ||
103 | |||
104 | public class StatLogger | ||
105 | { | ||
106 | public DateTime StartTime; | ||
107 | public string Path; | ||
108 | public System.IO.BinaryWriter Log; | ||
109 | } | ||
110 | |||
111 | static StatLogger m_statLog = null; | ||
112 | static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300); | ||
113 | static string m_statsDir = String.Empty; | ||
114 | static Object m_statLockObject = new Object(); | ||
115 | |||
116 | private void LogSimStats(SimStats stats) | ||
117 | { | ||
118 | SimStatsPacket pack = new SimStatsPacket(); | ||
119 | pack.Region = new SimStatsPacket.RegionBlock(); | ||
120 | pack.Region.RegionX = stats.RegionX; | ||
121 | pack.Region.RegionY = stats.RegionY; | ||
122 | pack.Region.RegionFlags = stats.RegionFlags; | ||
123 | pack.Region.ObjectCapacity = stats.ObjectCapacity; | ||
124 | //pack.Region = //stats.RegionBlock; | ||
125 | pack.Stat = stats.StatsBlock; | ||
126 | pack.Header.Reliable = false; | ||
127 | |||
128 | // note that we are inside the reporter lock when called | ||
129 | DateTime now = DateTime.Now; | ||
130 | |||
131 | // hide some time information into the packet | ||
132 | pack.Header.Sequence = (uint)now.Ticks; | ||
133 | |||
134 | lock (m_statLockObject) // m_statLog is shared so make sure there is only executer here | ||
135 | { | ||
136 | try | ||
137 | { | ||
138 | if (m_statLog == null || now > m_statLog.StartTime + m_statLogPeriod) | ||
139 | { | ||
140 | // First log file or time has expired, start writing to a new log file | ||
141 | if (m_statLog != null && m_statLog.Log != null) | ||
142 | { | ||
143 | m_statLog.Log.Close(); | ||
144 | } | ||
145 | m_statLog = new StatLogger(); | ||
146 | m_statLog.StartTime = now; | ||
147 | m_statLog.Path = (m_statsDir.Length > 0 ? m_statsDir + System.IO.Path.DirectorySeparatorChar.ToString() : "") | ||
148 | + String.Format("stats-{0}.log", now.ToString("yyyyMMddHHmmss")); | ||
149 | m_statLog.Log = new BinaryWriter(File.Open(m_statLog.Path, FileMode.Append, FileAccess.Write)); | ||
150 | } | ||
151 | |||
152 | // Write the serialized data to disk | ||
153 | if (m_statLog != null && m_statLog.Log != null) | ||
154 | m_statLog.Log.Write(pack.ToBytes()); | ||
155 | } | ||
156 | catch (Exception ex) | ||
157 | { | ||
158 | m_log.Error("statistics gathering failed: " + ex.Message, ex); | ||
159 | if (m_statLog != null && m_statLog.Log != null) | ||
160 | { | ||
161 | m_statLog.Log.Close(); | ||
162 | } | ||
163 | m_statLog = null; | ||
164 | } | ||
165 | } | ||
166 | return; | ||
167 | } | ||
168 | } | ||
169 | } | ||
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index e95d2f8..87a0a8d 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
91 | private string httpsCN = ""; | 91 | private string httpsCN = ""; |
92 | private bool httpSSL = false; | 92 | private bool httpSSL = false; |
93 | private uint httpsslport = 0; | 93 | private uint httpsslport = 0; |
94 | private bool GridMode = false; | 94 | // private bool GridMode = false; |
95 | 95 | ||
96 | #region IRegionModule Members | 96 | #region IRegionModule Members |
97 | 97 | ||
@@ -126,10 +126,10 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
126 | 126 | ||
127 | } | 127 | } |
128 | 128 | ||
129 | if (startupcfg != null) | 129 | // if (startupcfg != null) |
130 | { | 130 | // { |
131 | GridMode = enabled = startupcfg.GetBoolean("gridmode", false); | 131 | // GridMode = enabled = startupcfg.GetBoolean("gridmode", false); |
132 | } | 132 | // } |
133 | 133 | ||
134 | if (cfg != null) | 134 | if (cfg != null) |
135 | { | 135 | { |
@@ -1213,18 +1213,19 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
1213 | } | 1213 | } |
1214 | } | 1214 | } |
1215 | 1215 | ||
1216 | private string CreateRandomStr(int len) | 1216 | // private string CreateRandomStr(int len) |
1217 | { | 1217 | // { |
1218 | Random rnd = new Random(Environment.TickCount); | 1218 | // Random rnd = new Random(Environment.TickCount); |
1219 | string returnstring = ""; | 1219 | // string returnstring = ""; |
1220 | string chars = "abcdefghijklmnopqrstuvwxyz0123456789"; | 1220 | // string chars = "abcdefghijklmnopqrstuvwxyz0123456789"; |
1221 | 1221 | // | |
1222 | for (int i = 0; i < len; i++) | 1222 | // for (int i = 0; i < len; i++) |
1223 | { | 1223 | // { |
1224 | returnstring += chars.Substring(rnd.Next(chars.Length), 1); | 1224 | // returnstring += chars.Substring(rnd.Next(chars.Length), 1); |
1225 | } | 1225 | // } |
1226 | return returnstring; | 1226 | // return returnstring; |
1227 | } | 1227 | // } |
1228 | |||
1228 | // Temporary hack to allow teleporting to and from Vaak | 1229 | // Temporary hack to allow teleporting to and from Vaak |
1229 | private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) | 1230 | private static bool customXertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) |
1230 | { | 1231 | { |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index aa3b30d..153aeec 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | |||
@@ -32,7 +32,6 @@ using System.Reflection; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Statistics; | 34 | using OpenSim.Framework.Statistics; |
35 | |||
36 | using OpenSim.Services.Connectors; | 35 | using OpenSim.Services.Connectors; |
37 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
@@ -48,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
48 | 47 | ||
49 | private bool m_Enabled = false; | 48 | private bool m_Enabled = false; |
50 | private bool m_Initialized = false; | 49 | private bool m_Initialized = false; |
51 | private Scene m_Scene; | 50 | // private Scene m_Scene; |
52 | private InventoryServicesConnector m_RemoteConnector; | 51 | private InventoryServicesConnector m_RemoteConnector; |
53 | 52 | ||
54 | public Type ReplaceableInterface | 53 | public Type ReplaceableInterface |
@@ -105,7 +104,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
105 | 104 | ||
106 | public void AddRegion(Scene scene) | 105 | public void AddRegion(Scene scene) |
107 | { | 106 | { |
108 | m_Scene = scene; | 107 | // m_Scene = scene; |
109 | //m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName); | 108 | //m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName); |
110 | 109 | ||
111 | if (!m_Enabled) | 110 | if (!m_Enabled) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 277060d..ada26cc 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -32,7 +32,6 @@ using System.Reflection; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Statistics; | 34 | using OpenSim.Framework.Statistics; |
35 | |||
36 | using OpenSim.Services.Connectors; | 35 | using OpenSim.Services.Connectors; |
37 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
@@ -48,7 +47,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
48 | 47 | ||
49 | private bool m_Enabled = false; | 48 | private bool m_Enabled = false; |
50 | private bool m_Initialized = false; | 49 | private bool m_Initialized = false; |
51 | private Scene m_Scene; | 50 | // private Scene m_Scene; |
52 | private XInventoryServicesConnector m_RemoteConnector; | 51 | private XInventoryServicesConnector m_RemoteConnector; |
53 | 52 | ||
54 | public Type ReplaceableInterface | 53 | public Type ReplaceableInterface |
@@ -109,7 +108,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
109 | 108 | ||
110 | public void AddRegion(Scene scene) | 109 | public void AddRegion(Scene scene) |
111 | { | 110 | { |
112 | m_Scene = scene; | 111 | // m_Scene = scene; |
113 | //m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName); | 112 | //m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName); |
114 | 113 | ||
115 | if (!m_Enabled) | 114 | if (!m_Enabled) |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index e1bc243..fb2edb9 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
55 | if (account != null) | 55 | if (account != null) |
56 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d)); | 56 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d)); |
57 | 57 | ||
58 | m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); | 58 | // m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); |
59 | } | 59 | } |
60 | 60 | ||
61 | public UserAccount Get(UUID userID, out bool inCache) | 61 | public UserAccount Get(UUID userID, out bool inCache) |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 27e492b..171e0b9 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -345,7 +345,6 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
345 | { | 345 | { |
346 | if (!s.IsChildAgent) | 346 | if (!s.IsChildAgent) |
347 | { | 347 | { |
348 | s.ControllingClient.SendTeleportLocationStart(); | ||
349 | m_scene.TeleportClientHome(user, s.ControllingClient); | 348 | m_scene.TeleportClientHome(user, s.ControllingClient); |
350 | } | 349 | } |
351 | } | 350 | } |
@@ -480,7 +479,6 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
480 | ScenePresence s = m_scene.GetScenePresence(prey); | 479 | ScenePresence s = m_scene.GetScenePresence(prey); |
481 | if (s != null) | 480 | if (s != null) |
482 | { | 481 | { |
483 | s.ControllingClient.SendTeleportLocationStart(); | ||
484 | m_scene.TeleportClientHome(prey, s.ControllingClient); | 482 | m_scene.TeleportClientHome(prey, s.ControllingClient); |
485 | } | 483 | } |
486 | } | 484 | } |
@@ -500,7 +498,6 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
500 | // Also make sure they are actually in the region | 498 | // Also make sure they are actually in the region |
501 | if (p != null && !p.IsChildAgent) | 499 | if (p != null && !p.IsChildAgent) |
502 | { | 500 | { |
503 | p.ControllingClient.SendTeleportLocationStart(); | ||
504 | m_scene.TeleportClientHome(p.UUID, p.ControllingClient); | 501 | m_scene.TeleportClientHome(p.UUID, p.ControllingClient); |
505 | } | 502 | } |
506 | } | 503 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 7e29a56..d00cb07 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -147,12 +147,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
147 | { | 147 | { |
148 | } | 148 | } |
149 | 149 | ||
150 | private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason) | 150 | // private bool OnVerifyUserConnection(ScenePresence scenePresence, out string reason) |
151 | { | 151 | // { |
152 | ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y); | 152 | // ILandObject nearestParcel = m_scene.GetNearestAllowedParcel(scenePresence.UUID, scenePresence.AbsolutePosition.X, scenePresence.AbsolutePosition.Y); |
153 | reason = "You are not allowed to enter this sim."; | 153 | // reason = "You are not allowed to enter this sim."; |
154 | return nearestParcel != null; | 154 | // return nearestParcel != null; |
155 | } | 155 | // } |
156 | 156 | ||
157 | void EventManagerOnNewClient(IClientAPI client) | 157 | void EventManagerOnNewClient(IClientAPI client) |
158 | { | 158 | { |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs new file mode 100644 index 0000000..62abd4c --- /dev/null +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -0,0 +1,263 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Mono.Addins; | ||
33 | using Nini.Config; | ||
34 | using OpenMetaverse; | ||
35 | using OpenMetaverse.Packets; | ||
36 | using OpenSim.Framework; | ||
37 | using OpenSim.Region.Framework; | ||
38 | using OpenSim.Region.Framework.Interfaces; | ||
39 | using OpenSim.Region.Framework.Scenes; | ||
40 | using OpenSim.Region.Framework.Scenes.Serialization; | ||
41 | |||
42 | namespace OpenSim.Region.CoreModules.World.Objects.BuySell | ||
43 | { | ||
44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BuySellModule")] | ||
45 | public class BuySellModule : IBuySellModule, INonSharedRegionModule | ||
46 | { | ||
47 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
49 | protected Scene m_scene = null; | ||
50 | protected IDialogModule m_dialogModule; | ||
51 | |||
52 | public string Name { get { return "Object BuySell Module"; } } | ||
53 | public Type ReplaceableInterface { get { return null; } } | ||
54 | |||
55 | public void Initialise(IConfigSource source) {} | ||
56 | |||
57 | public void AddRegion(Scene scene) | ||
58 | { | ||
59 | m_scene = scene; | ||
60 | m_scene.RegisterModuleInterface<IBuySellModule>(this); | ||
61 | m_scene.EventManager.OnNewClient += SubscribeToClientEvents; | ||
62 | } | ||
63 | |||
64 | public void RemoveRegion(Scene scene) | ||
65 | { | ||
66 | m_scene.EventManager.OnNewClient -= SubscribeToClientEvents; | ||
67 | } | ||
68 | |||
69 | public void RegionLoaded(Scene scene) | ||
70 | { | ||
71 | m_dialogModule = scene.RequestModuleInterface<IDialogModule>(); | ||
72 | } | ||
73 | |||
74 | public void Close() | ||
75 | { | ||
76 | RemoveRegion(m_scene); | ||
77 | } | ||
78 | |||
79 | public void SubscribeToClientEvents(IClientAPI client) | ||
80 | { | ||
81 | client.OnObjectSaleInfo += ObjectSaleInfo; | ||
82 | } | ||
83 | |||
84 | protected void ObjectSaleInfo( | ||
85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | ||
86 | { | ||
87 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); | ||
88 | if (part == null || part.ParentGroup == null) | ||
89 | return; | ||
90 | |||
91 | if (part.ParentGroup.IsDeleted) | ||
92 | return; | ||
93 | |||
94 | part = part.ParentGroup.RootPart; | ||
95 | |||
96 | part.ObjectSaleType = saleType; | ||
97 | part.SalePrice = salePrice; | ||
98 | |||
99 | part.ParentGroup.HasGroupChanged = true; | ||
100 | |||
101 | part.GetProperties(client); | ||
102 | } | ||
103 | |||
104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) | ||
105 | { | ||
106 | SceneObjectPart part = m_scene.GetSceneObjectPart(localID); | ||
107 | |||
108 | if (part == null) | ||
109 | return false; | ||
110 | |||
111 | if (part.ParentGroup == null) | ||
112 | return false; | ||
113 | |||
114 | SceneObjectGroup group = part.ParentGroup; | ||
115 | |||
116 | switch (saleType) | ||
117 | { | ||
118 | case 1: // Sell as original (in-place sale) | ||
119 | uint effectivePerms = group.GetEffectivePermissions(); | ||
120 | |||
121 | if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) | ||
122 | { | ||
123 | if (m_dialogModule != null) | ||
124 | m_dialogModule.SendAlertToUser(remoteClient, "This item doesn't appear to be for sale"); | ||
125 | return false; | ||
126 | } | ||
127 | |||
128 | group.SetOwnerId(remoteClient.AgentId); | ||
129 | group.SetRootPartOwner(part, remoteClient.AgentId, remoteClient.ActiveGroupId); | ||
130 | |||
131 | List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values); | ||
132 | |||
133 | if (m_scene.Permissions.PropagatePermissions()) | ||
134 | { | ||
135 | foreach (SceneObjectPart child in partList) | ||
136 | { | ||
137 | child.Inventory.ChangeInventoryOwner(remoteClient.AgentId); | ||
138 | child.TriggerScriptChangedEvent(Changed.OWNER); | ||
139 | child.ApplyNextOwnerPermissions(); | ||
140 | } | ||
141 | } | ||
142 | |||
143 | part.ObjectSaleType = 0; | ||
144 | part.SalePrice = 10; | ||
145 | |||
146 | group.HasGroupChanged = true; | ||
147 | part.GetProperties(remoteClient); | ||
148 | part.TriggerScriptChangedEvent(Changed.OWNER); | ||
149 | group.ResumeScripts(); | ||
150 | part.ScheduleFullUpdate(); | ||
151 | |||
152 | break; | ||
153 | |||
154 | case 2: // Sell a copy | ||
155 | Vector3 inventoryStoredPosition = new Vector3 | ||
156 | (((group.AbsolutePosition.X > (int)Constants.RegionSize) | ||
157 | ? 250 | ||
158 | : group.AbsolutePosition.X) | ||
159 | , | ||
160 | (group.AbsolutePosition.X > (int)Constants.RegionSize) | ||
161 | ? 250 | ||
162 | : group.AbsolutePosition.X, | ||
163 | group.AbsolutePosition.Z); | ||
164 | |||
165 | Vector3 originalPosition = group.AbsolutePosition; | ||
166 | |||
167 | group.AbsolutePosition = inventoryStoredPosition; | ||
168 | |||
169 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); | ||
170 | group.AbsolutePosition = originalPosition; | ||
171 | |||
172 | uint perms = group.GetEffectivePermissions(); | ||
173 | |||
174 | if ((perms & (uint)PermissionMask.Transfer) == 0) | ||
175 | { | ||
176 | if (m_dialogModule != null) | ||
177 | m_dialogModule.SendAlertToUser(remoteClient, "This item doesn't appear to be for sale"); | ||
178 | return false; | ||
179 | } | ||
180 | |||
181 | AssetBase asset = m_scene.CreateAsset( | ||
182 | group.GetPartName(localID), | ||
183 | group.GetPartDescription(localID), | ||
184 | (sbyte)AssetType.Object, | ||
185 | Utils.StringToBytes(sceneObjectXml), | ||
186 | group.OwnerID); | ||
187 | m_scene.AssetService.Store(asset); | ||
188 | |||
189 | InventoryItemBase item = new InventoryItemBase(); | ||
190 | item.CreatorId = part.CreatorID.ToString(); | ||
191 | |||
192 | item.ID = UUID.Random(); | ||
193 | item.Owner = remoteClient.AgentId; | ||
194 | item.AssetID = asset.FullID; | ||
195 | item.Description = asset.Description; | ||
196 | item.Name = asset.Name; | ||
197 | item.AssetType = asset.Type; | ||
198 | item.InvType = (int)InventoryType.Object; | ||
199 | item.Folder = categoryID; | ||
200 | |||
201 | uint nextPerms=(perms & 7) << 13; | ||
202 | if ((nextPerms & (uint)PermissionMask.Copy) == 0) | ||
203 | perms &= ~(uint)PermissionMask.Copy; | ||
204 | if ((nextPerms & (uint)PermissionMask.Transfer) == 0) | ||
205 | perms &= ~(uint)PermissionMask.Transfer; | ||
206 | if ((nextPerms & (uint)PermissionMask.Modify) == 0) | ||
207 | perms &= ~(uint)PermissionMask.Modify; | ||
208 | |||
209 | item.BasePermissions = perms & part.NextOwnerMask; | ||
210 | item.CurrentPermissions = perms & part.NextOwnerMask; | ||
211 | item.NextPermissions = part.NextOwnerMask; | ||
212 | item.EveryOnePermissions = part.EveryoneMask & | ||
213 | part.NextOwnerMask; | ||
214 | item.GroupPermissions = part.GroupMask & | ||
215 | part.NextOwnerMask; | ||
216 | item.CurrentPermissions |= 16; // Slam! | ||
217 | item.CreationDate = Util.UnixTimeSinceEpoch(); | ||
218 | |||
219 | if (m_scene.InventoryService.AddItem(item)) | ||
220 | { | ||
221 | remoteClient.SendInventoryItemCreateUpdate(item, 0); | ||
222 | } | ||
223 | else | ||
224 | { | ||
225 | if (m_dialogModule != null) | ||
226 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); | ||
227 | return false; | ||
228 | } | ||
229 | break; | ||
230 | |||
231 | case 3: // Sell contents | ||
232 | List<UUID> invList = part.Inventory.GetInventoryList(); | ||
233 | |||
234 | bool okToSell = true; | ||
235 | |||
236 | foreach (UUID invID in invList) | ||
237 | { | ||
238 | TaskInventoryItem item1 = part.Inventory.GetInventoryItem(invID); | ||
239 | if ((item1.CurrentPermissions & | ||
240 | (uint)PermissionMask.Transfer) == 0) | ||
241 | { | ||
242 | okToSell = false; | ||
243 | break; | ||
244 | } | ||
245 | } | ||
246 | |||
247 | if (!okToSell) | ||
248 | { | ||
249 | if (m_dialogModule != null) | ||
250 | m_dialogModule.SendAlertToUser( | ||
251 | remoteClient, "This item's inventory doesn't appear to be for sale"); | ||
252 | return false; | ||
253 | } | ||
254 | |||
255 | if (invList.Count > 0) | ||
256 | m_scene.MoveTaskInventoryItems(remoteClient.AgentId, part.Name, part, invList); | ||
257 | break; | ||
258 | } | ||
259 | |||
260 | return true; | ||
261 | } | ||
262 | } | ||
263 | } \ No newline at end of file | ||
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 2817477..d4166d0 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -588,8 +588,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
588 | client.OnModifyTerrain += client_OnModifyTerrain; | 588 | client.OnModifyTerrain += client_OnModifyTerrain; |
589 | client.OnBakeTerrain += client_OnBakeTerrain; | 589 | client.OnBakeTerrain += client_OnBakeTerrain; |
590 | client.OnLandUndo += client_OnLandUndo; | 590 | client.OnLandUndo += client_OnLandUndo; |
591 | client.OnUnackedTerrain += client_OnUnackedTerrain; | ||
591 | } | 592 | } |
592 | 593 | ||
593 | /// <summary> | 594 | /// <summary> |
594 | /// Checks to see if the terrain has been modified since last check | 595 | /// Checks to see if the terrain has been modified since last check |
595 | /// but won't attempt to limit those changes to the limits specified in the estate settings | 596 | /// but won't attempt to limit those changes to the limits specified in the estate settings |
@@ -810,6 +811,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
810 | InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter | 811 | InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter |
811 | } | 812 | } |
812 | } | 813 | } |
814 | |||
815 | protected void client_OnUnackedTerrain(IClientAPI client, int patchX, int patchY) | ||
816 | { | ||
817 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); | ||
818 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); | ||
819 | } | ||
813 | 820 | ||
814 | private void StoreUndoState() | 821 | private void StoreUndoState() |
815 | { | 822 | { |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index a1a4f9e..9f88517 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -138,14 +138,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
138 | remoteClient.SendMapBlock(blocks, 2); | 138 | remoteClient.SendMapBlock(blocks, 2); |
139 | } | 139 | } |
140 | 140 | ||
141 | private Scene GetClientScene(IClientAPI client) | 141 | // private Scene GetClientScene(IClientAPI client) |
142 | { | 142 | // { |
143 | foreach (Scene s in m_scenes) | 143 | // foreach (Scene s in m_scenes) |
144 | { | 144 | // { |
145 | if (client.Scene.RegionInfo.RegionHandle == s.RegionInfo.RegionHandle) | 145 | // if (client.Scene.RegionInfo.RegionHandle == s.RegionInfo.RegionHandle) |
146 | return s; | 146 | // return s; |
147 | } | 147 | // } |
148 | return m_scene; | 148 | // return m_scene; |
149 | } | 149 | // } |
150 | } | 150 | } |
151 | } | 151 | } |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 9d9967a..f036d85 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -1000,11 +1000,24 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1000 | return responsemap; | 1000 | return responsemap; |
1001 | } | 1001 | } |
1002 | 1002 | ||
1003 | public void RegenerateMaptile(byte[] data) | 1003 | public void GenerateMaptile() |
1004 | { | 1004 | { |
1005 | // Cannot create a map for a nonexistant heightmap | ||
1006 | if (m_scene.Heightmap == null) | ||
1007 | return; | ||
1008 | |||
1009 | //create a texture asset of the terrain | ||
1010 | IMapImageGenerator terrain = m_scene.RequestModuleInterface<IMapImageGenerator>(); | ||
1011 | if (terrain == null) | ||
1012 | return; | ||
1013 | |||
1014 | byte[] data = terrain.WriteJpeg2000Image("defaultstripe.png"); | ||
1015 | if (data == null) | ||
1016 | return; | ||
1017 | |||
1005 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; | 1018 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; |
1006 | 1019 | ||
1007 | m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE"); | 1020 | m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); |
1008 | 1021 | ||
1009 | m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); | 1022 | m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); |
1010 | 1023 | ||
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index 00f6918..c489972 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | |||
@@ -135,7 +135,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
135 | xmlobject.AppendChild(node); | 135 | xmlobject.AppendChild(node); |
136 | 136 | ||
137 | node = nodeFactory.CreateNode(XmlNodeType.Element, "flags", ""); | 137 | node = nodeFactory.CreateNode(XmlNodeType.Element, "flags", ""); |
138 | node.InnerText = String.Format("{0:x}", m_rootPart.ObjectFlags); | 138 | node.InnerText = String.Format("{0:x}", (uint)m_rootPart.Flags); |
139 | xmlobject.AppendChild(node); | 139 | xmlobject.AppendChild(node); |
140 | 140 | ||
141 | node = nodeFactory.CreateNode(XmlNodeType.Element, "regionuuid", ""); | 141 | node = nodeFactory.CreateNode(XmlNodeType.Element, "regionuuid", ""); |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index cdc56a2..944ad94 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -520,7 +520,11 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
520 | { | 520 | { |
521 | } | 521 | } |
522 | 522 | ||
523 | public virtual void SendTeleportLocationStart() | 523 | public virtual void SendTeleportStart(uint flags) |
524 | { | ||
525 | } | ||
526 | |||
527 | public virtual void SendTeleportProgress(uint flags, string message) | ||
524 | { | 528 | { |
525 | } | 529 | } |
526 | 530 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs new file mode 100644 index 0000000..0132bae --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IBuySellModule.cs | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenMetaverse; | ||
29 | using OpenSim.Framework; | ||
30 | |||
31 | namespace OpenSim.Region.Framework.Interfaces | ||
32 | { | ||
33 | public interface IBuySellModule | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// Try to buy an object | ||
37 | /// </summary> | ||
38 | /// <param name="remoteClient"></param> | ||
39 | /// <param name="categoryID"></param> | ||
40 | /// <param name="localID"></param> | ||
41 | /// <param name="saleType"></param> | ||
42 | /// <returns> | ||
43 | /// True on a successful purchase, false on failure | ||
44 | /// </returns> | ||
45 | bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType); | ||
46 | } | ||
47 | } \ No newline at end of file | ||
diff --git a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs index f8a5bad..7296ac3 100644 --- a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs | |||
@@ -25,7 +25,6 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | |||
29 | namespace OpenSim.Region.Framework.Interfaces | 28 | namespace OpenSim.Region.Framework.Interfaces |
30 | { | 29 | { |
31 | public interface ICloudModule : IRegionModule | 30 | public interface ICloudModule : IRegionModule |
@@ -35,4 +34,4 @@ namespace OpenSim.Region.Framework.Interfaces | |||
35 | /// </summary> | 34 | /// </summary> |
36 | float CloudCover(int x, int y, int z); | 35 | float CloudCover(int x, int y, int z); |
37 | } | 36 | } |
38 | } | 37 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs index 2390ff4..1e92fde 100644 --- a/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IInventoryTransferModule.cs | |||
@@ -35,7 +35,6 @@ namespace OpenSim.Region.Framework.Interfaces | |||
35 | /// </summary> | 35 | /// </summary> |
36 | public interface IInventoryTransferModule | 36 | public interface IInventoryTransferModule |
37 | { | 37 | { |
38 | void SetRootAgentScene(UUID agentID, Scene scene); | ||
39 | bool NeedSceneCacheClear(UUID agentID, Scene scene); | 38 | bool NeedSceneCacheClear(UUID agentID, Scene scene); |
40 | } | 39 | } |
41 | } | 40 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs index ac6afed..d6e31f4 100644 --- a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs | |||
@@ -29,6 +29,9 @@ namespace OpenSim.Region.Framework.Interfaces | |||
29 | { | 29 | { |
30 | public interface IWorldMapModule | 30 | public interface IWorldMapModule |
31 | { | 31 | { |
32 | void RegenerateMaptile(byte[] data); | 32 | /// <summary> |
33 | /// Generate a map tile for the scene. a terrain texture for this scene | ||
34 | /// </summary> | ||
35 | void GenerateMaptile(); | ||
33 | } | 36 | } |
34 | } | 37 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index c6db7af..145f9ed 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs | |||
@@ -197,9 +197,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
197 | return 0.0; | 197 | return 0.0; |
198 | 198 | ||
199 | // Use group position for child prims | 199 | // Use group position for child prims |
200 | Vector3 entityPos = entity.AbsolutePosition; | 200 | Vector3 entityPos; |
201 | if (entity is SceneObjectPart) | 201 | if (entity is SceneObjectPart) |
202 | entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; | 202 | entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; |
203 | else | 203 | else |
204 | entityPos = entity.AbsolutePosition; | 204 | entityPos = entity.AbsolutePosition; |
205 | 205 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 17159b4..18ea865 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -687,7 +687,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
687 | /// <summary> | 687 | /// <summary> |
688 | /// Create a new asset data structure. | 688 | /// Create a new asset data structure. |
689 | /// </summary> | 689 | /// </summary> |
690 | private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data, UUID creatorID) | 690 | public AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data, UUID creatorID) |
691 | { | 691 | { |
692 | AssetBase asset = new AssetBase(UUID.Random(), name, assetType, creatorID.ToString()); | 692 | AssetBase asset = new AssetBase(UUID.Random(), name, assetType, creatorID.ToString()); |
693 | asset.Description = description; | 693 | asset.Description = description; |
@@ -869,7 +869,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
869 | ScenePresence presence; | 869 | ScenePresence presence; |
870 | if (TryGetScenePresence(remoteClient.AgentId, out presence)) | 870 | if (TryGetScenePresence(remoteClient.AgentId, out presence)) |
871 | { | 871 | { |
872 | byte[] data = null; | 872 | // byte[] data = null; |
873 | 873 | ||
874 | AssetBase asset = new AssetBase(); | 874 | AssetBase asset = new AssetBase(); |
875 | asset.FullID = olditemID; | 875 | asset.FullID = olditemID; |
@@ -877,8 +877,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
877 | asset.Name = name; | 877 | asset.Name = name; |
878 | asset.Description = description; | 878 | asset.Description = description; |
879 | 879 | ||
880 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | 880 | CreateNewInventoryItem( |
881 | 881 | remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, | |
882 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, | ||
883 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | ||
882 | } | 884 | } |
883 | else | 885 | else |
884 | { | 886 | { |
@@ -911,7 +913,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
911 | InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs); | 913 | InventoryService.DeleteFolders(remoteClient.AgentId, folderIDs); |
912 | } | 914 | } |
913 | 915 | ||
914 | |||
915 | /// <summary> | 916 | /// <summary> |
916 | /// Send the details of a prim's inventory to the client. | 917 | /// Send the details of a prim's inventory to the client. |
917 | /// </summary> | 918 | /// </summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7c89e65..73472a9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -496,73 +496,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
496 | 496 | ||
497 | #endregion | 497 | #endregion |
498 | 498 | ||
499 | #region BinaryStats | ||
500 | |||
501 | public class StatLogger | ||
502 | { | ||
503 | public DateTime StartTime; | ||
504 | public string Path; | ||
505 | public System.IO.BinaryWriter Log; | ||
506 | } | ||
507 | static StatLogger m_statLog = null; | ||
508 | static TimeSpan m_statLogPeriod = TimeSpan.FromSeconds(300); | ||
509 | static string m_statsDir = String.Empty; | ||
510 | static Object m_statLockObject = new Object(); | ||
511 | private void LogSimStats(SimStats stats) | ||
512 | { | ||
513 | SimStatsPacket pack = new SimStatsPacket(); | ||
514 | pack.Region = new SimStatsPacket.RegionBlock(); | ||
515 | pack.Region.RegionX = stats.RegionX; | ||
516 | pack.Region.RegionY = stats.RegionY; | ||
517 | pack.Region.RegionFlags = stats.RegionFlags; | ||
518 | pack.Region.ObjectCapacity = stats.ObjectCapacity; | ||
519 | //pack.Region = //stats.RegionBlock; | ||
520 | pack.Stat = stats.StatsBlock; | ||
521 | pack.Header.Reliable = false; | ||
522 | |||
523 | // note that we are inside the reporter lock when called | ||
524 | DateTime now = DateTime.Now; | ||
525 | |||
526 | // hide some time information into the packet | ||
527 | pack.Header.Sequence = (uint)now.Ticks; | ||
528 | |||
529 | lock (m_statLockObject) // m_statLog is shared so make sure there is only executer here | ||
530 | { | ||
531 | try | ||
532 | { | ||
533 | if (m_statLog == null || now > m_statLog.StartTime + m_statLogPeriod) | ||
534 | { | ||
535 | // First log file or time has expired, start writing to a new log file | ||
536 | if (m_statLog != null && m_statLog.Log != null) | ||
537 | { | ||
538 | m_statLog.Log.Close(); | ||
539 | } | ||
540 | m_statLog = new StatLogger(); | ||
541 | m_statLog.StartTime = now; | ||
542 | m_statLog.Path = (m_statsDir.Length > 0 ? m_statsDir + System.IO.Path.DirectorySeparatorChar.ToString() : "") | ||
543 | + String.Format("stats-{0}.log", now.ToString("yyyyMMddHHmmss")); | ||
544 | m_statLog.Log = new BinaryWriter(File.Open(m_statLog.Path, FileMode.Append, FileAccess.Write)); | ||
545 | } | ||
546 | |||
547 | // Write the serialized data to disk | ||
548 | if (m_statLog != null && m_statLog.Log != null) | ||
549 | m_statLog.Log.Write(pack.ToBytes()); | ||
550 | } | ||
551 | catch (Exception ex) | ||
552 | { | ||
553 | m_log.Error("statistics gathering failed: " + ex.Message, ex); | ||
554 | if (m_statLog != null && m_statLog.Log != null) | ||
555 | { | ||
556 | m_statLog.Log.Close(); | ||
557 | } | ||
558 | m_statLog = null; | ||
559 | } | ||
560 | } | ||
561 | return; | ||
562 | } | ||
563 | |||
564 | #endregion | ||
565 | |||
566 | #region Constructors | 499 | #region Constructors |
567 | 500 | ||
568 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, | 501 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, |
@@ -628,45 +561,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
628 | if (m_storageManager.EstateDataStore != null) | 561 | if (m_storageManager.EstateDataStore != null) |
629 | { | 562 | { |
630 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); | 563 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); |
631 | if (m_regInfo.EstateSettings.EstateID == 0) // No record at all | ||
632 | { | ||
633 | MainConsole.Instance.Output("Your region is not part of an estate."); | ||
634 | while (true) | ||
635 | { | ||
636 | string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"}); | ||
637 | if (response == "no") | ||
638 | { | ||
639 | // Create a new estate | ||
640 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, true); | ||
641 | |||
642 | m_regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", m_regInfo.EstateSettings.EstateName); | ||
643 | m_regInfo.EstateSettings.Save(); | ||
644 | break; | ||
645 | } | ||
646 | else | ||
647 | { | ||
648 | response = MainConsole.Instance.CmdPrompt("Estate name to join", "None"); | ||
649 | if (response == "None") | ||
650 | continue; | ||
651 | |||
652 | List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response); | ||
653 | if (estateIDs.Count < 1) | ||
654 | { | ||
655 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); | ||
656 | continue; | ||
657 | } | ||
658 | |||
659 | int estateID = estateIDs[0]; | ||
660 | |||
661 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID); | ||
662 | |||
663 | if (m_storageManager.EstateDataStore.LinkRegion(m_regInfo.RegionID, estateID)) | ||
664 | break; | ||
665 | |||
666 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | ||
667 | } | ||
668 | } | ||
669 | } | ||
670 | } | 564 | } |
671 | 565 | ||
672 | #endregion Region Settings | 566 | #endregion Region Settings |
@@ -771,38 +665,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
771 | 665 | ||
772 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); | 666 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); |
773 | CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false); | 667 | CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false); |
774 | |||
775 | #region BinaryStats | ||
776 | |||
777 | try | ||
778 | { | ||
779 | IConfig statConfig = m_config.Configs["Statistics.Binary"]; | ||
780 | if (statConfig.Contains("enabled") && statConfig.GetBoolean("enabled")) | ||
781 | { | ||
782 | if (statConfig.Contains("collect_region_stats")) | ||
783 | { | ||
784 | if (statConfig.GetBoolean("collect_region_stats")) | ||
785 | { | ||
786 | // if enabled, add us to the event. If not enabled, I won't get called | ||
787 | StatsReporter.OnSendStatsResult += LogSimStats; | ||
788 | } | ||
789 | } | ||
790 | if (statConfig.Contains("region_stats_period_seconds")) | ||
791 | { | ||
792 | m_statLogPeriod = TimeSpan.FromSeconds(statConfig.GetInt("region_stats_period_seconds")); | ||
793 | } | ||
794 | if (statConfig.Contains("stats_dir")) | ||
795 | { | ||
796 | m_statsDir = statConfig.GetString("stats_dir"); | ||
797 | } | ||
798 | } | ||
799 | } | ||
800 | catch | ||
801 | { | ||
802 | // if it doesn't work, we don't collect anything | ||
803 | } | ||
804 | |||
805 | #endregion BinaryStats | ||
806 | } | 668 | } |
807 | catch | 669 | catch |
808 | { | 670 | { |
@@ -1844,33 +1706,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1844 | 1706 | ||
1845 | } | 1707 | } |
1846 | 1708 | ||
1847 | /// <summary> | ||
1848 | /// Create a terrain texture for this scene | ||
1849 | /// </summary> | ||
1850 | public void CreateTerrainTexture() | ||
1851 | { | ||
1852 | //create a texture asset of the terrain | ||
1853 | IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>(); | ||
1854 | |||
1855 | // Cannot create a map for a nonexistant heightmap yet. | ||
1856 | if (Heightmap == null) | ||
1857 | return; | ||
1858 | |||
1859 | if (terrain == null) | ||
1860 | return; | ||
1861 | |||
1862 | byte[] data = terrain.WriteJpeg2000Image("defaultstripe.png"); | ||
1863 | if (data != null) | ||
1864 | { | ||
1865 | IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>(); | ||
1866 | |||
1867 | if (mapModule != null) | ||
1868 | mapModule.RegenerateMaptile(data); | ||
1869 | else | ||
1870 | m_log.DebugFormat("[SCENE]: MapModule is null, can't save maptile"); | ||
1871 | } | ||
1872 | } | ||
1873 | |||
1874 | #endregion | 1709 | #endregion |
1875 | 1710 | ||
1876 | #region Load Land | 1711 | #region Load Land |
@@ -1929,7 +1764,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1929 | 1764 | ||
1930 | AddRestoredSceneObject(group, true, true); | 1765 | AddRestoredSceneObject(group, true, true); |
1931 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 1766 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
1932 | rootPart.ObjectFlags &= ~(uint)PrimFlags.Scripted; | 1767 | rootPart.Flags &= ~PrimFlags.Scripted; |
1933 | rootPart.TrimPermissions(); | 1768 | rootPart.TrimPermissions(); |
1934 | group.CheckSculptAndLoad(); | 1769 | group.CheckSculptAndLoad(); |
1935 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 1770 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
@@ -2248,7 +2083,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2248 | 2083 | ||
2249 | foreach (SceneObjectPart part in group.Children.Values) | 2084 | foreach (SceneObjectPart part in group.Children.Values) |
2250 | { | 2085 | { |
2251 | if (part.IsJoint() && ((part.ObjectFlags&(uint)PrimFlags.Physics) != 0)) | 2086 | if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0)) |
2252 | { | 2087 | { |
2253 | PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed? | 2088 | PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed? |
2254 | } | 2089 | } |
@@ -2761,7 +2596,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2761 | if (!VerifyClient(aCircuit, ep, out vialogin)) | 2596 | if (!VerifyClient(aCircuit, ep, out vialogin)) |
2762 | { | 2597 | { |
2763 | // uh-oh, this is fishy | 2598 | // uh-oh, this is fishy |
2764 | m_log.WarnFormat("[Scene]: Agent {0} with session {1} connecting with unidentified end point {2}. Refusing service.", | 2599 | m_log.WarnFormat("[SCENE]: Agent {0} with session {1} connecting with unidentified end point {2}. Refusing service.", |
2765 | client.AgentId, client.SessionId, ep.ToString()); | 2600 | client.AgentId, client.SessionId, ep.ToString()); |
2766 | try | 2601 | try |
2767 | { | 2602 | { |
@@ -2769,13 +2604,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2769 | } | 2604 | } |
2770 | catch (Exception e) | 2605 | catch (Exception e) |
2771 | { | 2606 | { |
2772 | m_log.DebugFormat("[Scene]: Exception while closing aborted client: {0}", e.StackTrace); | 2607 | m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace); |
2773 | } | 2608 | } |
2774 | return; | 2609 | return; |
2775 | } | 2610 | } |
2776 | } | 2611 | } |
2777 | 2612 | ||
2778 | m_log.Debug("[Scene] Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); | 2613 | m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); |
2779 | 2614 | ||
2780 | ScenePresence sp = CreateAndAddScenePresence(client); | 2615 | ScenePresence sp = CreateAndAddScenePresence(client); |
2781 | if (aCircuit != null) | 2616 | if (aCircuit != null) |
@@ -2804,7 +2639,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2804 | // Do the verification here | 2639 | // Do the verification here |
2805 | if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0) | 2640 | if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0) |
2806 | { | 2641 | { |
2807 | m_log.DebugFormat("[Scene]: Incoming client {0} {1} in region {2} via Login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); | 2642 | m_log.DebugFormat("[SCENE]: Incoming client {0} {1} in region {2} via Login", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); |
2808 | vialogin = true; | 2643 | vialogin = true; |
2809 | IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>(); | 2644 | IUserAgentVerificationModule userVerification = RequestModuleInterface<IUserAgentVerificationModule>(); |
2810 | if (userVerification != null && ep != null) | 2645 | if (userVerification != null && ep != null) |
@@ -2814,11 +2649,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2814 | if (!userVerification.VerifyClient(aCircuit, /*ep.Address.ToString() */ addr.ToString())) | 2649 | if (!userVerification.VerifyClient(aCircuit, /*ep.Address.ToString() */ addr.ToString())) |
2815 | { | 2650 | { |
2816 | // uh-oh, this is fishy | 2651 | // uh-oh, this is fishy |
2817 | m_log.DebugFormat("[Scene]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); | 2652 | m_log.DebugFormat("[SCENE]: User Client Verification for {0} {1} in {2} returned false", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); |
2818 | return false; | 2653 | return false; |
2819 | } | 2654 | } |
2820 | else | 2655 | else |
2821 | m_log.DebugFormat("[Scene]: User Client Verification for {0} {1} in {2} returned true", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); | 2656 | m_log.DebugFormat("[SCENE]: User Client Verification for {0} {1} in {2} returned true", aCircuit.firstname, aCircuit.lastname, RegionInfo.RegionName); |
2822 | } | 2657 | } |
2823 | } | 2658 | } |
2824 | 2659 | ||
@@ -2849,7 +2684,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2849 | } | 2684 | } |
2850 | catch (Exception e) | 2685 | catch (Exception e) |
2851 | { | 2686 | { |
2852 | m_log.DebugFormat("[Scene]: Exception while closing aborted client: {0}", e.StackTrace); | 2687 | m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace); |
2853 | } | 2688 | } |
2854 | } | 2689 | } |
2855 | else | 2690 | else |
@@ -2879,7 +2714,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2879 | public virtual void SubscribeToClientTerrainEvents(IClientAPI client) | 2714 | public virtual void SubscribeToClientTerrainEvents(IClientAPI client) |
2880 | { | 2715 | { |
2881 | client.OnRegionHandShakeReply += SendLayerData; | 2716 | client.OnRegionHandShakeReply += SendLayerData; |
2882 | client.OnUnackedTerrain += TerrainUnAcked; | ||
2883 | } | 2717 | } |
2884 | 2718 | ||
2885 | public virtual void SubscribeToClientPrimEvents(IClientAPI client) | 2719 | public virtual void SubscribeToClientPrimEvents(IClientAPI client) |
@@ -2919,8 +2753,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2919 | client.OnUndo += m_sceneGraph.HandleUndo; | 2753 | client.OnUndo += m_sceneGraph.HandleUndo; |
2920 | client.OnRedo += m_sceneGraph.HandleRedo; | 2754 | client.OnRedo += m_sceneGraph.HandleRedo; |
2921 | client.OnObjectDescription += m_sceneGraph.PrimDescription; | 2755 | client.OnObjectDescription += m_sceneGraph.PrimDescription; |
2922 | client.OnObjectDrop += m_sceneGraph.DropObject; | 2756 | client.OnObjectDrop += m_sceneGraph.DropObject; |
2923 | client.OnObjectSaleInfo += ObjectSaleInfo; | ||
2924 | client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; | 2757 | client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; |
2925 | client.OnObjectOwner += ObjectOwner; | 2758 | client.OnObjectOwner += ObjectOwner; |
2926 | } | 2759 | } |
@@ -3011,7 +2844,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3011 | public virtual void UnSubscribeToClientTerrainEvents(IClientAPI client) | 2844 | public virtual void UnSubscribeToClientTerrainEvents(IClientAPI client) |
3012 | { | 2845 | { |
3013 | client.OnRegionHandShakeReply -= SendLayerData; | 2846 | client.OnRegionHandShakeReply -= SendLayerData; |
3014 | client.OnUnackedTerrain -= TerrainUnAcked; | ||
3015 | } | 2847 | } |
3016 | 2848 | ||
3017 | public virtual void UnSubscribeToClientPrimEvents(IClientAPI client) | 2849 | public virtual void UnSubscribeToClientPrimEvents(IClientAPI client) |
@@ -3050,7 +2882,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3050 | client.OnRedo -= m_sceneGraph.HandleRedo; | 2882 | client.OnRedo -= m_sceneGraph.HandleRedo; |
3051 | client.OnObjectDescription -= m_sceneGraph.PrimDescription; | 2883 | client.OnObjectDescription -= m_sceneGraph.PrimDescription; |
3052 | client.OnObjectDrop -= m_sceneGraph.DropObject; | 2884 | client.OnObjectDrop -= m_sceneGraph.DropObject; |
3053 | client.OnObjectSaleInfo -= ObjectSaleInfo; | ||
3054 | client.OnObjectIncludeInSearch -= m_sceneGraph.MakeObjectSearchable; | 2885 | client.OnObjectIncludeInSearch -= m_sceneGraph.MakeObjectSearchable; |
3055 | client.OnObjectOwner -= ObjectOwner; | 2886 | client.OnObjectOwner -= ObjectOwner; |
3056 | } | 2887 | } |
@@ -4625,23 +4456,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4625 | client.SendRegionHandle(regionID, handle); | 4456 | client.SendRegionHandle(regionID, handle); |
4626 | } | 4457 | } |
4627 | 4458 | ||
4628 | public void TerrainUnAcked(IClientAPI client, int patchX, int patchY) | ||
4629 | { | ||
4630 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); | ||
4631 | client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); | ||
4632 | } | ||
4633 | |||
4634 | public void SetRootAgentScene(UUID agentID) | ||
4635 | { | ||
4636 | IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>(); | ||
4637 | if (inv == null) | ||
4638 | return; | ||
4639 | |||
4640 | inv.SetRootAgentScene(agentID, this); | ||
4641 | |||
4642 | EventManager.TriggerSetRootAgentScene(agentID, this); | ||
4643 | } | ||
4644 | |||
4645 | public bool NeedSceneCacheClear(UUID agentID) | 4459 | public bool NeedSceneCacheClear(UUID agentID) |
4646 | { | 4460 | { |
4647 | IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>(); | 4461 | IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>(); |
@@ -4651,184 +4465,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4651 | return inv.NeedSceneCacheClear(agentID, this); | 4465 | return inv.NeedSceneCacheClear(agentID, this); |
4652 | } | 4466 | } |
4653 | 4467 | ||
4654 | public void ObjectSaleInfo(IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | ||
4655 | { | ||
4656 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
4657 | if (part == null || part.ParentGroup == null) | ||
4658 | return; | ||
4659 | |||
4660 | if (part.ParentGroup.IsDeleted) | ||
4661 | return; | ||
4662 | |||
4663 | part = part.ParentGroup.RootPart; | ||
4664 | |||
4665 | part.ObjectSaleType = saleType; | ||
4666 | part.SalePrice = salePrice; | ||
4667 | |||
4668 | part.ParentGroup.HasGroupChanged = true; | ||
4669 | |||
4670 | part.GetProperties(client); | ||
4671 | } | ||
4672 | |||
4673 | public bool PerformObjectBuy(IClientAPI remoteClient, UUID categoryID, | ||
4674 | uint localID, byte saleType) | ||
4675 | { | ||
4676 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
4677 | |||
4678 | if (part == null) | ||
4679 | return false; | ||
4680 | |||
4681 | if (part.ParentGroup == null) | ||
4682 | return false; | ||
4683 | |||
4684 | SceneObjectGroup group = part.ParentGroup; | ||
4685 | |||
4686 | switch (saleType) | ||
4687 | { | ||
4688 | case 1: // Sell as original (in-place sale) | ||
4689 | uint effectivePerms=group.GetEffectivePermissions(); | ||
4690 | |||
4691 | if ((effectivePerms & (uint)PermissionMask.Transfer) == 0) | ||
4692 | { | ||
4693 | m_dialogModule.SendAlertToUser(remoteClient, "This item doesn't appear to be for sale"); | ||
4694 | return false; | ||
4695 | } | ||
4696 | |||
4697 | group.SetOwnerId(remoteClient.AgentId); | ||
4698 | group.SetRootPartOwner(part, remoteClient.AgentId, | ||
4699 | remoteClient.ActiveGroupId); | ||
4700 | |||
4701 | List<SceneObjectPart> partList = | ||
4702 | new List<SceneObjectPart>(group.Children.Values); | ||
4703 | |||
4704 | if (Permissions.PropagatePermissions()) | ||
4705 | { | ||
4706 | foreach (SceneObjectPart child in partList) | ||
4707 | { | ||
4708 | child.Inventory.ChangeInventoryOwner(remoteClient.AgentId); | ||
4709 | child.TriggerScriptChangedEvent(Changed.OWNER); | ||
4710 | child.ApplyNextOwnerPermissions(); | ||
4711 | } | ||
4712 | } | ||
4713 | |||
4714 | part.ObjectSaleType = 0; | ||
4715 | part.SalePrice = 10; | ||
4716 | |||
4717 | group.HasGroupChanged = true; | ||
4718 | part.GetProperties(remoteClient); | ||
4719 | part.TriggerScriptChangedEvent(Changed.OWNER); | ||
4720 | group.ResumeScripts(); | ||
4721 | part.ScheduleFullUpdate(); | ||
4722 | |||
4723 | break; | ||
4724 | |||
4725 | case 2: // Sell a copy | ||
4726 | |||
4727 | |||
4728 | Vector3 inventoryStoredPosition = new Vector3 | ||
4729 | (((group.AbsolutePosition.X > (int)Constants.RegionSize) | ||
4730 | ? 250 | ||
4731 | : group.AbsolutePosition.X) | ||
4732 | , | ||
4733 | (group.AbsolutePosition.X > (int)Constants.RegionSize) | ||
4734 | ? 250 | ||
4735 | : group.AbsolutePosition.X, | ||
4736 | group.AbsolutePosition.Z); | ||
4737 | |||
4738 | Vector3 originalPosition = group.AbsolutePosition; | ||
4739 | |||
4740 | group.AbsolutePosition = inventoryStoredPosition; | ||
4741 | |||
4742 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); | ||
4743 | group.AbsolutePosition = originalPosition; | ||
4744 | |||
4745 | uint perms=group.GetEffectivePermissions(); | ||
4746 | |||
4747 | if ((perms & (uint)PermissionMask.Transfer) == 0) | ||
4748 | { | ||
4749 | m_dialogModule.SendAlertToUser(remoteClient, "This item doesn't appear to be for sale"); | ||
4750 | return false; | ||
4751 | } | ||
4752 | |||
4753 | AssetBase asset = CreateAsset( | ||
4754 | group.GetPartName(localID), | ||
4755 | group.GetPartDescription(localID), | ||
4756 | (sbyte)AssetType.Object, | ||
4757 | Utils.StringToBytes(sceneObjectXml), | ||
4758 | group.OwnerID); | ||
4759 | AssetService.Store(asset); | ||
4760 | |||
4761 | InventoryItemBase item = new InventoryItemBase(); | ||
4762 | item.CreatorId = part.CreatorID.ToString(); | ||
4763 | |||
4764 | item.ID = UUID.Random(); | ||
4765 | item.Owner = remoteClient.AgentId; | ||
4766 | item.AssetID = asset.FullID; | ||
4767 | item.Description = asset.Description; | ||
4768 | item.Name = asset.Name; | ||
4769 | item.AssetType = asset.Type; | ||
4770 | item.InvType = (int)InventoryType.Object; | ||
4771 | item.Folder = categoryID; | ||
4772 | |||
4773 | uint nextPerms=(perms & 7) << 13; | ||
4774 | if ((nextPerms & (uint)PermissionMask.Copy) == 0) | ||
4775 | perms &= ~(uint)PermissionMask.Copy; | ||
4776 | if ((nextPerms & (uint)PermissionMask.Transfer) == 0) | ||
4777 | perms &= ~(uint)PermissionMask.Transfer; | ||
4778 | if ((nextPerms & (uint)PermissionMask.Modify) == 0) | ||
4779 | perms &= ~(uint)PermissionMask.Modify; | ||
4780 | |||
4781 | item.BasePermissions = perms & part.NextOwnerMask; | ||
4782 | item.CurrentPermissions = perms & part.NextOwnerMask; | ||
4783 | item.NextPermissions = part.NextOwnerMask; | ||
4784 | item.EveryOnePermissions = part.EveryoneMask & | ||
4785 | part.NextOwnerMask; | ||
4786 | item.GroupPermissions = part.GroupMask & | ||
4787 | part.NextOwnerMask; | ||
4788 | item.CurrentPermissions |= 16; // Slam! | ||
4789 | item.CreationDate = Util.UnixTimeSinceEpoch(); | ||
4790 | |||
4791 | if (InventoryService.AddItem(item)) | ||
4792 | remoteClient.SendInventoryItemCreateUpdate(item, 0); | ||
4793 | else | ||
4794 | { | ||
4795 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); | ||
4796 | return false; | ||
4797 | } | ||
4798 | break; | ||
4799 | |||
4800 | case 3: // Sell contents | ||
4801 | List<UUID> invList = part.Inventory.GetInventoryList(); | ||
4802 | |||
4803 | bool okToSell = true; | ||
4804 | |||
4805 | foreach (UUID invID in invList) | ||
4806 | { | ||
4807 | TaskInventoryItem item1 = part.Inventory.GetInventoryItem(invID); | ||
4808 | if ((item1.CurrentPermissions & | ||
4809 | (uint)PermissionMask.Transfer) == 0) | ||
4810 | { | ||
4811 | okToSell = false; | ||
4812 | break; | ||
4813 | } | ||
4814 | } | ||
4815 | |||
4816 | if (!okToSell) | ||
4817 | { | ||
4818 | m_dialogModule.SendAlertToUser( | ||
4819 | remoteClient, "This item's inventory doesn't appear to be for sale"); | ||
4820 | return false; | ||
4821 | } | ||
4822 | |||
4823 | if (invList.Count > 0) | ||
4824 | MoveTaskInventoryItems(remoteClient.AgentId, part.Name, | ||
4825 | part, invList); | ||
4826 | break; | ||
4827 | } | ||
4828 | |||
4829 | return true; | ||
4830 | } | ||
4831 | |||
4832 | public void CleanTempObjects() | 4468 | public void CleanTempObjects() |
4833 | { | 4469 | { |
4834 | List<EntityBase> objs = GetEntities(); | 4470 | List<EntityBase> objs = GetEntities(); |
@@ -4969,7 +4605,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4969 | } | 4605 | } |
4970 | 4606 | ||
4971 | // turn the proxy non-physical, which also stops its client-side interpolation | 4607 | // turn the proxy non-physical, which also stops its client-side interpolation |
4972 | bool wasUsingPhysics = ((jointProxyObject.ObjectFlags & (uint)PrimFlags.Physics) != 0); | 4608 | bool wasUsingPhysics = ((jointProxyObject.Flags & PrimFlags.Physics) != 0); |
4973 | if (wasUsingPhysics) | 4609 | if (wasUsingPhysics) |
4974 | { | 4610 | { |
4975 | jointProxyObject.UpdatePrimFlags(false, false, true, false); // FIXME: possible deadlock here; check to make sure all the scene alterations set into motion here won't deadlock | 4611 | jointProxyObject.UpdatePrimFlags(false, false, true, false); // FIXME: possible deadlock here; check to make sure all the scene alterations set into motion here won't deadlock |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 20a2abc..9b66fad 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1588,9 +1588,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1588 | 1588 | ||
1589 | public void aggregateScriptEvents() | 1589 | public void aggregateScriptEvents() |
1590 | { | 1590 | { |
1591 | uint objectflagupdate=(uint)RootPart.GetEffectiveObjectFlags(); | 1591 | PrimFlags objectflagupdate = (PrimFlags)RootPart.GetEffectiveObjectFlags(); |
1592 | 1592 | ||
1593 | scriptEvents aggregateScriptEvents=0; | 1593 | scriptEvents aggregateScriptEvents = 0; |
1594 | 1594 | ||
1595 | lockPartsForRead(true); | 1595 | lockPartsForRead(true); |
1596 | { | 1596 | { |
@@ -1600,7 +1600,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1600 | if (part == null) | 1600 | if (part == null) |
1601 | continue; | 1601 | continue; |
1602 | if (part != RootPart) | 1602 | if (part != RootPart) |
1603 | part.ObjectFlags = objectflagupdate; | 1603 | part.Flags = objectflagupdate; |
1604 | aggregateScriptEvents |= part.AggregateScriptEvents; | 1604 | aggregateScriptEvents |= part.AggregateScriptEvents; |
1605 | 1605 | ||
1606 | } | 1606 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index dd780b7..9e52b00 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1348,7 +1348,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1348 | public void AddFlag(PrimFlags flag) | 1348 | public void AddFlag(PrimFlags flag) |
1349 | { | 1349 | { |
1350 | // PrimFlags prevflag = Flags; | 1350 | // PrimFlags prevflag = Flags; |
1351 | if ((ObjectFlags & (uint) flag) == 0) | 1351 | if ((Flags & flag) == 0) |
1352 | { | 1352 | { |
1353 | //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); | 1353 | //m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString()); |
1354 | Flags |= flag; | 1354 | Flags |= flag; |
@@ -1638,7 +1638,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1638 | dupe.Velocity = new Vector3(0, 0, 0); | 1638 | dupe.Velocity = new Vector3(0, 0, 0); |
1639 | dupe.Acceleration = new Vector3(0, 0, 0); | 1639 | dupe.Acceleration = new Vector3(0, 0, 0); |
1640 | dupe.AngularVelocity = new Vector3(0, 0, 0); | 1640 | dupe.AngularVelocity = new Vector3(0, 0, 0); |
1641 | dupe.ObjectFlags = ObjectFlags; | 1641 | dupe.Flags = Flags; |
1642 | 1642 | ||
1643 | dupe._ownershipCost = _ownershipCost; | 1643 | dupe._ownershipCost = _ownershipCost; |
1644 | dupe._objectSaleType = _objectSaleType; | 1644 | dupe._objectSaleType = _objectSaleType; |
@@ -1675,7 +1675,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1675 | m_parentGroup.Scene.AssetService.Get(dupe.m_shape.SculptTexture.ToString(), dupe, AssetReceived); | 1675 | m_parentGroup.Scene.AssetService.Get(dupe.m_shape.SculptTexture.ToString(), dupe, AssetReceived); |
1676 | } | 1676 | } |
1677 | 1677 | ||
1678 | bool UsePhysics = ((dupe.ObjectFlags & (uint)PrimFlags.Physics) != 0); | 1678 | bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0); |
1679 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); | 1679 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); |
1680 | } | 1680 | } |
1681 | 1681 | ||
@@ -4299,9 +4299,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4299 | 4299 | ||
4300 | public void UpdatePrimFlags(bool UsePhysics, bool IsTemporary, bool IsPhantom, bool IsVD) | 4300 | public void UpdatePrimFlags(bool UsePhysics, bool IsTemporary, bool IsPhantom, bool IsVD) |
4301 | { | 4301 | { |
4302 | bool wasUsingPhysics = ((ObjectFlags & (uint) PrimFlags.Physics) != 0); | 4302 | bool wasUsingPhysics = ((Flags & PrimFlags.Physics) != 0); |
4303 | bool wasTemporary = ((ObjectFlags & (uint)PrimFlags.TemporaryOnRez) != 0); | 4303 | bool wasTemporary = ((Flags & PrimFlags.TemporaryOnRez) != 0); |
4304 | bool wasPhantom = ((ObjectFlags & (uint)PrimFlags.Phantom) != 0); | 4304 | bool wasPhantom = ((Flags & PrimFlags.Phantom) != 0); |
4305 | bool wasVD = VolumeDetectActive; | 4305 | bool wasVD = VolumeDetectActive; |
4306 | 4306 | ||
4307 | if ((UsePhysics == wasUsingPhysics) && (wasTemporary == IsTemporary) && (wasPhantom == IsPhantom) && (IsVD==wasVD)) | 4307 | if ((UsePhysics == wasUsingPhysics) && (wasTemporary == IsTemporary) && (wasPhantom == IsPhantom) && (IsVD==wasVD)) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4064339..02e60f8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -905,7 +905,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
905 | m_grouptitle = gm.GetGroupTitle(m_uuid); | 905 | m_grouptitle = gm.GetGroupTitle(m_uuid); |
906 | 906 | ||
907 | m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; | 907 | m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; |
908 | m_scene.SetRootAgentScene(m_uuid); | 908 | |
909 | m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); | ||
909 | 910 | ||
910 | // Moved this from SendInitialData to ensure that m_appearance is initialized | 911 | // Moved this from SendInitialData to ensure that m_appearance is initialized |
911 | // before the inventory is processed in MakeRootAgent. This fixes a race condition | 912 | // before the inventory is processed in MakeRootAgent. This fixes a race condition |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 91cbee9..b98aabe 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1045,11 +1045,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1045 | 1045 | ||
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | public void SendTeleportLocationStart() | 1048 | public void SendTeleportStart(uint flags) |
1049 | { | 1049 | { |
1050 | 1050 | ||
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | public void SendTeleportProgress(uint flags, string message) | ||
1054 | { | ||
1055 | } | ||
1056 | |||
1053 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | 1057 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) |
1054 | { | 1058 | { |
1055 | 1059 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 3f15b69..2969503 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -1129,7 +1129,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1129 | OSDMap NewGroupDataMap = new OSDMap(1); | 1129 | OSDMap NewGroupDataMap = new OSDMap(1); |
1130 | 1130 | ||
1131 | GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID)); | 1131 | GroupDataMap.Add("GroupID", OSD.FromUUID(membership.GroupID)); |
1132 | GroupDataMap.Add("GroupPowers", OSD.FromBinary(membership.GroupPowers)); | 1132 | GroupDataMap.Add("GroupPowers", OSD.FromULong(membership.GroupPowers)); |
1133 | GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices)); | 1133 | GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(membership.AcceptNotices)); |
1134 | GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture)); | 1134 | GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(membership.GroupPicture)); |
1135 | GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution)); | 1135 | GroupDataMap.Add("Contribution", OSD.FromInteger(membership.Contribution)); |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 653f856..61cbb90 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -72,8 +72,6 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
72 | 72 | ||
73 | private IConfigSource m_gConfig; | 73 | private IConfigSource m_gConfig; |
74 | 74 | ||
75 | |||
76 | |||
77 | /// <summary> | 75 | /// <summary> |
78 | /// Region UUIDS indexed by AgentID | 76 | /// Region UUIDS indexed by AgentID |
79 | /// </summary> | 77 | /// </summary> |
@@ -85,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
85 | 83 | ||
86 | // private int m_stipend = 1000; | 84 | // private int m_stipend = 1000; |
87 | 85 | ||
88 | private int ObjectCapacity = 45000; | 86 | // private int ObjectCapacity = 45000; |
89 | private int ObjectCount = 0; | 87 | private int ObjectCount = 0; |
90 | private int PriceEnergyUnit = 0; | 88 | private int PriceEnergyUnit = 0; |
91 | private int PriceGroupCreate = 0; | 89 | private int PriceGroupCreate = 0; |
@@ -267,13 +265,11 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
267 | PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); | 265 | PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); |
268 | m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false); | 266 | m_sellEnabled = startupConfig.GetBoolean("SellEnabled", false); |
269 | } | 267 | } |
270 | |||
271 | } | 268 | } |
272 | 269 | ||
273 | private void GetClientFunds(IClientAPI client) | 270 | private void GetClientFunds(IClientAPI client) |
274 | { | 271 | { |
275 | CheckExistAndRefreshFunds(client.AgentId); | 272 | CheckExistAndRefreshFunds(client.AgentId); |
276 | |||
277 | } | 273 | } |
278 | 274 | ||
279 | /// <summary> | 275 | /// <summary> |
@@ -815,7 +811,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
815 | remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); | 811 | remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false); |
816 | return; | 812 | return; |
817 | } | 813 | } |
818 | s.PerformObjectBuy(remoteClient, categoryID, localID, saleType); | 814 | |
815 | IBuySellModule module = s.RequestModuleInterface<IBuySellModule>(); | ||
816 | if (module != null) | ||
817 | module.BuyObject(remoteClient, categoryID, localID, saleType); | ||
819 | } | 818 | } |
820 | } | 819 | } |
821 | 820 | ||
@@ -825,7 +824,5 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
825 | RegionMoneyRequest = 1, | 824 | RegionMoneyRequest = 1, |
826 | Gift = 2, | 825 | Gift = 2, |
827 | Purchase = 3 | 826 | Purchase = 3 |
828 | } | 827 | } |
829 | 828 | } \ No newline at end of file | |
830 | |||
831 | } | ||
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index d6f4d53..1653ecb 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -611,7 +611,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
611 | { | 611 | { |
612 | } | 612 | } |
613 | 613 | ||
614 | public virtual void SendTeleportLocationStart() | 614 | public virtual void SendTeleportStart(uint flags) |
615 | { | ||
616 | } | ||
617 | |||
618 | public virtual void SendTeleportProgress(uint flags, string message) | ||
615 | { | 619 | { |
616 | } | 620 | } |
617 | 621 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9bece31..e3a69a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4405,7 +4405,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4405 | if (m_host.OwnerID == World.LandChannel.GetLandObject( | 4405 | if (m_host.OwnerID == World.LandChannel.GetLandObject( |
4406 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 4406 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
4407 | { | 4407 | { |
4408 | presence.ControllingClient.SendTeleportLocationStart(); | ||
4409 | World.TeleportClientHome(agentId, presence.ControllingClient); | 4408 | World.TeleportClientHome(agentId, presence.ControllingClient); |
4410 | } | 4409 | } |
4411 | } | 4410 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 73e87b5..a08b135 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -673,7 +673,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
673 | regionName = regInfo.RegionName; | 673 | regionName = regInfo.RegionName; |
674 | } | 674 | } |
675 | } | 675 | } |
676 | presence.ControllingClient.SendTeleportLocationStart(); | ||
677 | World.RequestTeleportLocation(presence.ControllingClient, regionName, | 676 | World.RequestTeleportLocation(presence.ControllingClient, regionName, |
678 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 677 | new Vector3((float)position.x, (float)position.y, (float)position.z), |
679 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); | 678 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); |
@@ -705,7 +704,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
705 | == World.LandChannel.GetLandObject( | 704 | == World.LandChannel.GetLandObject( |
706 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 705 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
707 | { | 706 | { |
708 | presence.ControllingClient.SendTeleportLocationStart(); | ||
709 | World.RequestTeleportLocation(presence.ControllingClient, regionHandle, | 707 | World.RequestTeleportLocation(presence.ControllingClient, regionHandle, |
710 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 708 | new Vector3((float)position.x, (float)position.y, (float)position.z), |
711 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); | 709 | new Vector3((float)lookat.x, (float)lookat.y, (float)lookat.z), (uint)TPFlags.ViaLocation); |