diff options
Diffstat (limited to 'OpenSim/Region')
17 files changed, 440 insertions, 42 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 95713e9..d52ebda 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -439,7 +439,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
439 | } | 439 | } |
440 | 440 | ||
441 | /// <summary> | 441 | /// <summary> |
442 | /// | 442 | /// Convert raw uploaded data into the appropriate asset and item. |
443 | /// </summary> | 443 | /// </summary> |
444 | /// <param name="assetID"></param> | 444 | /// <param name="assetID"></param> |
445 | /// <param name="inventoryItem"></param> | 445 | /// <param name="inventoryItem"></param> |
@@ -506,8 +506,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
506 | } | 506 | } |
507 | } | 507 | } |
508 | 508 | ||
509 | |||
510 | |||
511 | /// <summary> | 509 | /// <summary> |
512 | /// | 510 | /// |
513 | /// </summary> | 511 | /// </summary> |
@@ -632,7 +630,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
632 | } | 630 | } |
633 | 631 | ||
634 | /// <summary> | 632 | /// <summary> |
635 | /// | 633 | /// Handle raw asset upload data via the capability. |
636 | /// </summary> | 634 | /// </summary> |
637 | /// <param name="data"></param> | 635 | /// <param name="data"></param> |
638 | /// <param name="path"></param> | 636 | /// <param name="path"></param> |
@@ -670,6 +668,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
670 | 668 | ||
671 | return res; | 669 | return res; |
672 | } | 670 | } |
671 | |||
673 | ///Left this in and commented in case there are unforseen issues | 672 | ///Left this in and commented in case there are unforseen issues |
674 | //private void SaveAssetToFile(string filename, byte[] data) | 673 | //private void SaveAssetToFile(string filename, byte[] data) |
675 | //{ | 674 | //{ |
@@ -679,6 +678,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
679 | // bw.Close(); | 678 | // bw.Close(); |
680 | // fs.Close(); | 679 | // fs.Close(); |
681 | //} | 680 | //} |
681 | |||
682 | private static void SaveAssetToFile(string filename, byte[] data) | 682 | private static void SaveAssetToFile(string filename, byte[] data) |
683 | { | 683 | { |
684 | string assetPath = "UserAssets"; | 684 | string assetPath = "UserAssets"; |
@@ -719,7 +719,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
719 | } | 719 | } |
720 | 720 | ||
721 | /// <summary> | 721 | /// <summary> |
722 | /// | 722 | /// Handle raw uploaded asset data. |
723 | /// </summary> | 723 | /// </summary> |
724 | /// <param name="data"></param> | 724 | /// <param name="data"></param> |
725 | /// <param name="path"></param> | 725 | /// <param name="path"></param> |
@@ -752,6 +752,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
752 | 752 | ||
753 | return res; | 753 | return res; |
754 | } | 754 | } |
755 | |||
755 | ///Left this in and commented in case there are unforseen issues | 756 | ///Left this in and commented in case there are unforseen issues |
756 | //private void SaveAssetToFile(string filename, byte[] data) | 757 | //private void SaveAssetToFile(string filename, byte[] data) |
757 | //{ | 758 | //{ |
@@ -761,6 +762,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
761 | // bw.Close(); | 762 | // bw.Close(); |
762 | // fs.Close(); | 763 | // fs.Close(); |
763 | //} | 764 | //} |
765 | |||
764 | private static void SaveAssetToFile(string filename, byte[] data) | 766 | private static void SaveAssetToFile(string filename, byte[] data) |
765 | { | 767 | { |
766 | string assetPath = "UserAssets"; | 768 | string assetPath = "UserAssets"; |
@@ -905,7 +907,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
905 | } | 907 | } |
906 | 908 | ||
907 | /// <summary> | 909 | /// <summary> |
908 | /// | 910 | /// Handle raw uploaded baked texture data. |
909 | /// </summary> | 911 | /// </summary> |
910 | /// <param name="data"></param> | 912 | /// <param name="data"></param> |
911 | /// <param name="path"></param> | 913 | /// <param name="path"></param> |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs new file mode 100644 index 0000000..9f78948 --- /dev/null +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | |||
@@ -0,0 +1,152 @@ | |||
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; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using Mono.Addins; | ||
34 | using OpenMetaverse; | ||
35 | using OpenMetaverse.StructuredData; | ||
36 | using OpenSim.Framework; | ||
37 | using OpenSim.Framework.Servers.HttpServer; | ||
38 | using OpenSim.Region.Framework.Interfaces; | ||
39 | using OpenSim.Region.Framework.Scenes; | ||
40 | using OpenSim.Services.Interfaces; | ||
41 | using Caps = OpenSim.Framework.Capabilities.Caps; | ||
42 | |||
43 | namespace OpenSim.Region.ClientStack.Linden | ||
44 | { | ||
45 | /// <summary> | ||
46 | /// SimulatorFeatures capability. This is required for uploading Mesh. | ||
47 | /// Since is accepts an open-ended response, we also send more information | ||
48 | /// for viewers that care to interpret it. | ||
49 | /// | ||
50 | /// NOTE: Part of this code was adapted from the Aurora project, specifically | ||
51 | /// the normal part of the response in the capability handler. | ||
52 | /// </summary> | ||
53 | /// | ||
54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | ||
55 | public class SimulatorFeaturesModule : ISharedRegionModule | ||
56 | { | ||
57 | private static readonly ILog m_log = | ||
58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
59 | private Scene m_scene; | ||
60 | |||
61 | private string m_MapImageServerURL = string.Empty; | ||
62 | private string m_SearchURL = string.Empty; | ||
63 | |||
64 | #region ISharedRegionModule Members | ||
65 | |||
66 | public void Initialise(IConfigSource source) | ||
67 | { | ||
68 | IConfig config = source.Configs["SimulatorFeatures"]; | ||
69 | if (config == null) | ||
70 | return; | ||
71 | |||
72 | m_MapImageServerURL = config.GetString("MapImageServerURI", string.Empty); | ||
73 | if (m_MapImageServerURL != string.Empty) | ||
74 | { | ||
75 | m_MapImageServerURL = m_MapImageServerURL.Trim(); | ||
76 | if (!m_MapImageServerURL.EndsWith("/")) | ||
77 | m_MapImageServerURL = m_MapImageServerURL + "/"; | ||
78 | } | ||
79 | |||
80 | m_SearchURL = config.GetString("SearchServerURI", string.Empty); | ||
81 | } | ||
82 | |||
83 | public void AddRegion(Scene s) | ||
84 | { | ||
85 | m_scene = s; | ||
86 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; | ||
87 | } | ||
88 | |||
89 | public void RemoveRegion(Scene s) | ||
90 | { | ||
91 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; | ||
92 | } | ||
93 | |||
94 | public void RegionLoaded(Scene s) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | public void PostInitialise() | ||
99 | { | ||
100 | } | ||
101 | |||
102 | public void Close() { } | ||
103 | |||
104 | public string Name { get { return "SimulatorFeaturesModule"; } } | ||
105 | |||
106 | public Type ReplaceableInterface | ||
107 | { | ||
108 | get { return null; } | ||
109 | } | ||
110 | |||
111 | #endregion | ||
112 | |||
113 | public void RegisterCaps(UUID agentID, Caps caps) | ||
114 | { | ||
115 | IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), SimulatorFeatures); | ||
116 | caps.RegisterHandler("SimulatorFeatures", reqHandler); | ||
117 | } | ||
118 | |||
119 | private Hashtable SimulatorFeatures(Hashtable mDhttpMethod) | ||
120 | { | ||
121 | m_log.DebugFormat("[SIMULATOR FEATURES MODULE]: SimulatorFeatures request"); | ||
122 | OSDMap data = new OSDMap(); | ||
123 | data["MeshRezEnabled"] = true; | ||
124 | data["MeshUploadEnabled"] = true; | ||
125 | data["MeshXferEnabled"] = true; | ||
126 | data["PhysicsMaterialsEnabled"] = true; | ||
127 | |||
128 | OSDMap typesMap = new OSDMap(); | ||
129 | typesMap["convex"] = true; | ||
130 | typesMap["none"] = true; | ||
131 | typesMap["prim"] = true; | ||
132 | data["PhysicsShapeTypes"] = typesMap; | ||
133 | |||
134 | // Extra information for viewers that want to use it | ||
135 | OSDMap gridServicesMap = new OSDMap(); | ||
136 | if (m_MapImageServerURL != string.Empty) | ||
137 | gridServicesMap["map-server-url"] = m_MapImageServerURL; | ||
138 | if (m_SearchURL != string.Empty) | ||
139 | gridServicesMap["search"] = m_SearchURL; | ||
140 | data["GridServices"] = gridServicesMap; | ||
141 | |||
142 | //Send back data | ||
143 | Hashtable responsedata = new Hashtable(); | ||
144 | responsedata["int_response_code"] = 200; | ||
145 | responsedata["content_type"] = "text/plain"; | ||
146 | responsedata["keepalive"] = false; | ||
147 | responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data); | ||
148 | return responsedata; | ||
149 | } | ||
150 | |||
151 | } | ||
152 | } | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index c2ad079..36ecb3b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -147,7 +147,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
147 | protected void SaveInvItem(InventoryItemBase inventoryItem, string path, Dictionary<string, object> options, IUserAccountService userAccountService) | 147 | protected void SaveInvItem(InventoryItemBase inventoryItem, string path, Dictionary<string, object> options, IUserAccountService userAccountService) |
148 | { | 148 | { |
149 | if (options.ContainsKey("verbose")) | 149 | if (options.ContainsKey("verbose")) |
150 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving item {0} with asset {1}", inventoryItem.ID, inventoryItem.AssetID); | 150 | m_log.InfoFormat( |
151 | "[INVENTORY ARCHIVER]: Saving item {0} {1} with asset {2}", | ||
152 | inventoryItem.ID, inventoryItem.Name, inventoryItem.AssetID); | ||
151 | 153 | ||
152 | string filename = path + CreateArchiveItemName(inventoryItem); | 154 | string filename = path + CreateArchiveItemName(inventoryItem); |
153 | 155 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 1341533..d54216a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -50,6 +50,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
50 | { | 50 | { |
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | /// <summary> | ||
54 | /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer. | ||
55 | /// </summary> | ||
56 | public int MaxTransferDistance { get; set; } | ||
57 | |||
53 | protected bool m_Enabled = false; | 58 | protected bool m_Enabled = false; |
54 | protected Scene m_aScene; | 59 | protected Scene m_aScene; |
55 | protected List<Scene> m_Scenes = new List<Scene>(); | 60 | protected List<Scene> m_Scenes = new List<Scene>(); |
@@ -78,13 +83,26 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
78 | string name = moduleConfig.GetString("EntityTransferModule", ""); | 83 | string name = moduleConfig.GetString("EntityTransferModule", ""); |
79 | if (name == Name) | 84 | if (name == Name) |
80 | { | 85 | { |
81 | m_agentsInTransit = new List<UUID>(); | 86 | InitialiseCommon(source); |
82 | m_Enabled = true; | 87 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} enabled.", Name); |
83 | m_log.InfoFormat("[ENTITY TRANSFER MODULE]: {0} enabled.", Name); | ||
84 | } | 88 | } |
85 | } | 89 | } |
86 | } | 90 | } |
87 | 91 | ||
92 | /// <summary> | ||
93 | /// Initialize config common for this module and any descendents. | ||
94 | /// </summary> | ||
95 | /// <param name="source"></param> | ||
96 | protected virtual void InitialiseCommon(IConfigSource source) | ||
97 | { | ||
98 | IConfig transferConfig = source.Configs["EntityTransfer"]; | ||
99 | if (transferConfig != null) | ||
100 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); | ||
101 | |||
102 | m_agentsInTransit = new List<UUID>(); | ||
103 | m_Enabled = true; | ||
104 | } | ||
105 | |||
88 | public virtual void PostInitialise() | 106 | public virtual void PostInitialise() |
89 | { | 107 | { |
90 | } | 108 | } |
@@ -114,7 +132,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
114 | return; | 132 | return; |
115 | } | 133 | } |
116 | 134 | ||
117 | |||
118 | public virtual void RemoveRegion(Scene scene) | 135 | public virtual void RemoveRegion(Scene scene) |
119 | { | 136 | { |
120 | if (!m_Enabled) | 137 | if (!m_Enabled) |
@@ -129,7 +146,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
129 | { | 146 | { |
130 | if (!m_Enabled) | 147 | if (!m_Enabled) |
131 | return; | 148 | return; |
132 | |||
133 | } | 149 | } |
134 | 150 | ||
135 | #endregion | 151 | #endregion |
@@ -204,8 +220,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
204 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); | 220 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); |
205 | return; | 221 | return; |
206 | } | 222 | } |
207 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} {2}@{3}", | 223 | |
208 | finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID, finalDestination.ServerURI); | 224 | uint curX = 0, curY = 0; |
225 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); | ||
226 | int curCellX = (int)(curX / Constants.RegionSize); | ||
227 | int curCellY = (int)(curY / Constants.RegionSize); | ||
228 | int destCellX = (int)(finalDestination.RegionLocX / Constants.RegionSize); | ||
229 | int destCellY = (int)(finalDestination.RegionLocY / Constants.RegionSize); | ||
230 | |||
231 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Source co-ords are x={0} y={1}", curRegionX, curRegionY); | ||
232 | // | ||
233 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final dest is x={0} y={1} {2}@{3}", | ||
234 | // destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI); | ||
209 | 235 | ||
210 | // Check that these are not the same coordinates | 236 | // Check that these are not the same coordinates |
211 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && | 237 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && |
@@ -216,6 +242,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
216 | return; | 242 | return; |
217 | } | 243 | } |
218 | 244 | ||
245 | if (Math.Abs(curCellX - destCellX) > MaxTransferDistance || Math.Abs(curCellY - destCellY) > MaxTransferDistance) | ||
246 | { | ||
247 | sp.ControllingClient.SendTeleportFailed( | ||
248 | string.Format( | ||
249 | "Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way", | ||
250 | finalDestination.RegionName, destCellX, destCellY, | ||
251 | sp.Scene.RegionInfo.RegionName, curCellX, curCellY, | ||
252 | MaxTransferDistance)); | ||
253 | |||
254 | return; | ||
255 | } | ||
256 | |||
219 | // | 257 | // |
220 | // This is it | 258 | // This is it |
221 | // | 259 | // |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 4d77ef4..a87279a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -67,10 +67,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
67 | string name = moduleConfig.GetString("EntityTransferModule", ""); | 67 | string name = moduleConfig.GetString("EntityTransferModule", ""); |
68 | if (name == Name) | 68 | if (name == Name) |
69 | { | 69 | { |
70 | m_agentsInTransit = new List<UUID>(); | 70 | InitialiseCommon(source); |
71 | 71 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | |
72 | m_Enabled = true; | ||
73 | m_log.InfoFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | ||
74 | } | 72 | } |
75 | } | 73 | } |
76 | } | 74 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs new file mode 100644 index 0000000..786e0b5 --- /dev/null +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs | |||
@@ -0,0 +1,137 @@ | |||
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 | using System; | ||
28 | using System.Reflection; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenSim.Services.Interfaces; | ||
32 | using OpenMetaverse; | ||
33 | using log4net; | ||
34 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
35 | |||
36 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | ||
37 | { | ||
38 | public class RegionInfoCache | ||
39 | { | ||
40 | private const double CACHE_EXPIRATION_SECONDS = 300.0; // 5 minutes | ||
41 | |||
42 | // private static readonly ILog m_log = | ||
43 | // LogManager.GetLogger( | ||
44 | // MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
46 | internal struct ScopedRegionUUID | ||
47 | { | ||
48 | public UUID m_scopeID; | ||
49 | public UUID m_regionID; | ||
50 | public ScopedRegionUUID(UUID scopeID, UUID regionID) | ||
51 | { | ||
52 | m_scopeID = scopeID; | ||
53 | m_regionID = regionID; | ||
54 | } | ||
55 | } | ||
56 | |||
57 | internal struct ScopedRegionName | ||
58 | { | ||
59 | public UUID m_scopeID; | ||
60 | public string m_name; | ||
61 | public ScopedRegionName(UUID scopeID, string name) | ||
62 | { | ||
63 | m_scopeID = scopeID; | ||
64 | m_name = name; | ||
65 | } | ||
66 | } | ||
67 | |||
68 | private ExpiringCache<ScopedRegionUUID, GridRegion> m_UUIDCache; | ||
69 | private ExpiringCache<ScopedRegionName, ScopedRegionUUID> m_NameCache; | ||
70 | |||
71 | public RegionInfoCache() | ||
72 | { | ||
73 | m_UUIDCache = new ExpiringCache<ScopedRegionUUID, GridRegion>(); | ||
74 | m_NameCache = new ExpiringCache<ScopedRegionName, ScopedRegionUUID>(); | ||
75 | } | ||
76 | |||
77 | public void Cache(GridRegion rinfo) | ||
78 | { | ||
79 | if (rinfo != null) | ||
80 | this.Cache(rinfo.ScopeID,rinfo.RegionID,rinfo); | ||
81 | } | ||
82 | |||
83 | public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo) | ||
84 | { | ||
85 | // for now, do not cache negative results; this is because | ||
86 | // we need to figure out how to handle regions coming online | ||
87 | // in a timely way | ||
88 | if (rinfo == null) | ||
89 | return; | ||
90 | |||
91 | ScopedRegionUUID id = new ScopedRegionUUID(scopeID,regionID); | ||
92 | |||
93 | // Cache even null accounts | ||
94 | m_UUIDCache.AddOrUpdate(id, rinfo, CACHE_EXPIRATION_SECONDS); | ||
95 | if (rinfo != null) | ||
96 | { | ||
97 | ScopedRegionName name = new ScopedRegionName(scopeID,rinfo.RegionName); | ||
98 | m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS); | ||
99 | } | ||
100 | } | ||
101 | |||
102 | public GridRegion Get(UUID scopeID, UUID regionID, out bool inCache) | ||
103 | { | ||
104 | inCache = false; | ||
105 | |||
106 | GridRegion rinfo = null; | ||
107 | ScopedRegionUUID id = new ScopedRegionUUID(scopeID,regionID); | ||
108 | if (m_UUIDCache.TryGetValue(id, out rinfo)) | ||
109 | { | ||
110 | inCache = true; | ||
111 | return rinfo; | ||
112 | } | ||
113 | |||
114 | return null; | ||
115 | } | ||
116 | |||
117 | public GridRegion Get(UUID scopeID, string name, out bool inCache) | ||
118 | { | ||
119 | inCache = false; | ||
120 | |||
121 | ScopedRegionName sname = new ScopedRegionName(scopeID,name); | ||
122 | |||
123 | ScopedRegionUUID id; | ||
124 | if (m_NameCache.TryGetValue(sname, out id)) | ||
125 | { | ||
126 | GridRegion rinfo = null; | ||
127 | if (m_UUIDCache.TryGetValue(id, out rinfo)) | ||
128 | { | ||
129 | inCache = true; | ||
130 | return rinfo; | ||
131 | } | ||
132 | } | ||
133 | |||
134 | return null; | ||
135 | } | ||
136 | } | ||
137 | } | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 33cc838..6f364ae 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | |||
@@ -53,6 +53,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
53 | private IGridService m_LocalGridService; | 53 | private IGridService m_LocalGridService; |
54 | private IGridService m_RemoteGridService; | 54 | private IGridService m_RemoteGridService; |
55 | 55 | ||
56 | private RegionInfoCache m_RegionInfoCache = new RegionInfoCache(); | ||
57 | |||
56 | public RemoteGridServicesConnector() | 58 | public RemoteGridServicesConnector() |
57 | { | 59 | { |
58 | } | 60 | } |
@@ -169,10 +171,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
169 | 171 | ||
170 | public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) | 172 | public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) |
171 | { | 173 | { |
172 | GridRegion rinfo = m_LocalGridService.GetRegionByUUID(scopeID, regionID); | 174 | bool inCache = false; |
175 | GridRegion rinfo = m_RegionInfoCache.Get(scopeID,regionID,out inCache); | ||
176 | if (inCache) | ||
177 | return rinfo; | ||
178 | |||
179 | rinfo = m_LocalGridService.GetRegionByUUID(scopeID, regionID); | ||
173 | if (rinfo == null) | 180 | if (rinfo == null) |
174 | rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID); | 181 | rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID); |
175 | 182 | ||
183 | m_RegionInfoCache.Cache(scopeID,regionID,rinfo); | ||
176 | return rinfo; | 184 | return rinfo; |
177 | } | 185 | } |
178 | 186 | ||
@@ -187,10 +195,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
187 | 195 | ||
188 | public GridRegion GetRegionByName(UUID scopeID, string regionName) | 196 | public GridRegion GetRegionByName(UUID scopeID, string regionName) |
189 | { | 197 | { |
190 | GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, regionName); | 198 | bool inCache = false; |
199 | GridRegion rinfo = m_RegionInfoCache.Get(scopeID,regionName, out inCache); | ||
200 | if (inCache) | ||
201 | return rinfo; | ||
202 | |||
203 | rinfo = m_LocalGridService.GetRegionByName(scopeID, regionName); | ||
191 | if (rinfo == null) | 204 | if (rinfo == null) |
192 | rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); | 205 | rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); |
193 | 206 | ||
207 | // can't cache negative results for name lookups | ||
208 | m_RegionInfoCache.Cache(rinfo); | ||
194 | return rinfo; | 209 | return rinfo; |
195 | } | 210 | } |
196 | 211 | ||
@@ -204,8 +219,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
204 | { | 219 | { |
205 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionsByName {0} found {1} regions", name, grinfo.Count); | 220 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionsByName {0} found {1} regions", name, grinfo.Count); |
206 | foreach (GridRegion r in grinfo) | 221 | foreach (GridRegion r in grinfo) |
222 | { | ||
223 | m_RegionInfoCache.Cache(r); | ||
207 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 224 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
208 | rinfo.Add(r); | 225 | rinfo.Add(r); |
226 | } | ||
209 | } | 227 | } |
210 | 228 | ||
211 | return rinfo; | 229 | return rinfo; |
@@ -221,8 +239,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
221 | { | 239 | { |
222 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionRange {0} found {1} regions", name, grinfo.Count); | 240 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionRange {0} found {1} regions", name, grinfo.Count); |
223 | foreach (GridRegion r in grinfo) | 241 | foreach (GridRegion r in grinfo) |
242 | { | ||
243 | m_RegionInfoCache.Cache(r); | ||
224 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 244 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
225 | rinfo.Add(r); | 245 | rinfo.Add(r); |
246 | } | ||
226 | } | 247 | } |
227 | 248 | ||
228 | return rinfo; | 249 | return rinfo; |
@@ -238,8 +259,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
238 | { | 259 | { |
239 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetDefaultRegions {0} found {1} regions", name, grinfo.Count); | 260 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetDefaultRegions {0} found {1} regions", name, grinfo.Count); |
240 | foreach (GridRegion r in grinfo) | 261 | foreach (GridRegion r in grinfo) |
262 | { | ||
263 | m_RegionInfoCache.Cache(r); | ||
241 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 264 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
242 | rinfo.Add(r); | 265 | rinfo.Add(r); |
266 | } | ||
243 | } | 267 | } |
244 | 268 | ||
245 | return rinfo; | 269 | return rinfo; |
@@ -255,8 +279,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
255 | { | 279 | { |
256 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetFallbackRegions {0} found {1} regions", name, grinfo.Count); | 280 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetFallbackRegions {0} found {1} regions", name, grinfo.Count); |
257 | foreach (GridRegion r in grinfo) | 281 | foreach (GridRegion r in grinfo) |
282 | { | ||
283 | m_RegionInfoCache.Cache(r); | ||
258 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 284 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
259 | rinfo.Add(r); | 285 | rinfo.Add(r); |
286 | } | ||
260 | } | 287 | } |
261 | 288 | ||
262 | return rinfo; | 289 | return rinfo; |
@@ -272,8 +299,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
272 | { | 299 | { |
273 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetHyperlinks {0} found {1} regions", name, grinfo.Count); | 300 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetHyperlinks {0} found {1} regions", name, grinfo.Count); |
274 | foreach (GridRegion r in grinfo) | 301 | foreach (GridRegion r in grinfo) |
302 | { | ||
303 | m_RegionInfoCache.Cache(r); | ||
275 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 304 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
276 | rinfo.Add(r); | 305 | rinfo.Add(r); |
306 | } | ||
277 | } | 307 | } |
278 | 308 | ||
279 | return rinfo; | 309 | return rinfo; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index ee90859..e224670 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -112,6 +112,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
112 | 112 | ||
113 | Object[] args = new Object[] { source }; | 113 | Object[] args = new Object[] { source }; |
114 | m_MapService = ServerUtils.LoadPlugin<IMapImageService>(service, args); | 114 | m_MapService = ServerUtils.LoadPlugin<IMapImageService>(service, args); |
115 | if (m_MapService == null) | ||
116 | { | ||
117 | m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Unable to load LocalServiceModule from {0}. MapService module disabled. Please fix the configuration.", service); | ||
118 | return; | ||
119 | } | ||
115 | 120 | ||
116 | m_refreshTimer.Enabled = true; | 121 | m_refreshTimer.Enabled = true; |
117 | m_refreshTimer.AutoReset = true; | 122 | m_refreshTimer.AutoReset = true; |
@@ -202,7 +207,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
202 | { | 207 | { |
203 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: upload maptile for {0}", scene.RegionInfo.RegionName); | 208 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: upload maptile for {0}", scene.RegionInfo.RegionName); |
204 | 209 | ||
205 | // Create a PNG map tile and upload it to the AddMapTile API | 210 | // Create a JPG map tile and upload it to the AddMapTile API |
206 | byte[] jpgData = Utils.EmptyBytes; | 211 | byte[] jpgData = Utils.EmptyBytes; |
207 | IMapImageGenerator tileGenerator = scene.RequestModuleInterface<IMapImageGenerator>(); | 212 | IMapImageGenerator tileGenerator = scene.RequestModuleInterface<IMapImageGenerator>(); |
208 | if (tileGenerator == null) | 213 | if (tileGenerator == null) |
@@ -220,13 +225,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
220 | } | 225 | } |
221 | } | 226 | } |
222 | 227 | ||
228 | if (jpgData == Utils.EmptyBytes) | ||
229 | { | ||
230 | m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Tile image generation failed"); | ||
231 | return; | ||
232 | } | ||
233 | |||
223 | string reason = string.Empty; | 234 | string reason = string.Empty; |
224 | if (!m_MapService.AddMapTile((int)scene.RegionInfo.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason)) | 235 | if (!m_MapService.AddMapTile((int)scene.RegionInfo.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason)) |
225 | { | 236 | { |
226 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}", | 237 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}", |
227 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, reason); | 238 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, reason); |
228 | } | 239 | } |
229 | |||
230 | } | 240 | } |
231 | } | 241 | } |
232 | } \ No newline at end of file | 242 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 3078ab3..6a9c3d0 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | |||
@@ -198,11 +198,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
198 | m_log.ErrorFormat( | 198 | m_log.ErrorFormat( |
199 | "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT); | 199 | "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT); |
200 | 200 | ||
201 | m_log.Error("[ARCHIVER]: OAR save aborted. PLEASE DO NOT USE THIS OAR, IT WILL BE INCOMPLETE."); | 201 | m_log.Error("[ARCHIVER]: Archive save aborted. PLEASE DO NOT USE THIS ARCHIVE, IT WILL BE INCOMPLETE."); |
202 | } | 202 | } |
203 | catch (Exception e) | 203 | catch (Exception e) |
204 | { | 204 | { |
205 | m_log.ErrorFormat("[ARCHIVER]: Timeout handler exception {0}", e); | 205 | m_log.ErrorFormat("[ARCHIVER]: Timeout handler exception {0}{1}", e.Message, e.StackTrace); |
206 | } | 206 | } |
207 | finally | 207 | finally |
208 | { | 208 | { |
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs index 6eb57eb..6163fd1 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
52 | public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule | 52 | public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule |
53 | { | 53 | { |
54 | private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); | 54 | private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); |
55 | private static readonly Color4 WATER_COLOR = new Color4(29, 71, 95, 216); | 55 | private static readonly Color4 WATER_COLOR = new Color4(29, 72, 96, 216); |
56 | 56 | ||
57 | private static readonly ILog m_log = | 57 | private static readonly ILog m_log = |
58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
61 | private IRendering m_primMesher; | 61 | private IRendering m_primMesher; |
62 | private IConfigSource m_config; | 62 | private IConfigSource m_config; |
63 | private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>(); | 63 | private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>(); |
64 | private bool m_useAntiAliasing = true; // TODO: Make this a config option | 64 | private bool m_useAntiAliasing = false; // TODO: Make this a config option |
65 | private bool m_Enabled = false; | 65 | private bool m_Enabled = false; |
66 | 66 | ||
67 | #region IRegionModule Members | 67 | #region IRegionModule Members |
@@ -192,8 +192,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
192 | 192 | ||
193 | #endregion Camera | 193 | #endregion Camera |
194 | 194 | ||
195 | renderer.Scene.addLight("Light1", new warp_Light(new warp_Vector(0.2f, 0.2f, 1f), 0xffffff, 320, 80)); | 195 | renderer.Scene.addLight("Light1", new warp_Light(new warp_Vector(1.0f, 0.5f, 1f), 0xffffff, 0, 320, 40)); |
196 | renderer.Scene.addLight("Light2", new warp_Light(new warp_Vector(-1f, -1f, 1f), 0xffffff, 100, 40)); | 196 | renderer.Scene.addLight("Light2", new warp_Light(new warp_Vector(-1f, -1f, 1f), 0xffffff, 0, 100, 40)); |
197 | 197 | ||
198 | CreateWater(renderer); | 198 | CreateWater(renderer); |
199 | CreateTerrain(renderer, textureTerrain); | 199 | CreateTerrain(renderer, textureTerrain); |
@@ -237,6 +237,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
237 | renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f); | 237 | renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f); |
238 | 238 | ||
239 | renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR)); | 239 | renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR)); |
240 | renderer.Scene.material("WaterColor").setReflectivity(0); // match water color with standard map module thanks lkalif | ||
240 | renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); | 241 | renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); |
241 | renderer.SetObjectMaterial("Water", "WaterColor"); | 242 | renderer.SetObjectMaterial("Water", "WaterColor"); |
242 | } | 243 | } |
@@ -322,6 +323,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
322 | warp_Material material = new warp_Material(texture); | 323 | warp_Material material = new warp_Material(texture); |
323 | material.setReflectivity(50); | 324 | material.setReflectivity(50); |
324 | renderer.Scene.addMaterial("TerrainColor", material); | 325 | renderer.Scene.addMaterial("TerrainColor", material); |
326 | renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif | ||
325 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); | 327 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); |
326 | } | 328 | } |
327 | 329 | ||
@@ -653,4 +655,4 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
653 | return result; | 655 | return result; |
654 | } | 656 | } |
655 | } | 657 | } |
656 | } | 658 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 00959b0..2e3b21f 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -91,6 +91,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
91 | remoteClient.SendAlertMessage("Use a search string with at least 3 characters"); | 91 | remoteClient.SendAlertMessage("Use a search string with at least 3 characters"); |
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | |||
95 | m_log.DebugFormat("MAP NAME=({0})", mapName); | ||
94 | 96 | ||
95 | // try to fetch from GridServer | 97 | // try to fetch from GridServer |
96 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); | 98 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); |
@@ -103,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
103 | if (info != null) | 105 | if (info != null) |
104 | regionInfos.Add(info); | 106 | regionInfos.Add(info); |
105 | } | 107 | } |
106 | else if (regionInfos.Count == 0 && mapName.StartsWith("http://")) | 108 | else if (regionInfos.Count == 0) |
107 | remoteClient.SendAlertMessage("Hyperlink could not be established."); | 109 | remoteClient.SendAlertMessage("Hyperlink could not be established."); |
108 | 110 | ||
109 | m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); | 111 | m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 79660a3..42ac9aa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1449,19 +1449,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1449 | 1449 | ||
1450 | foreach (SceneObjectPart part in partList) | 1450 | foreach (SceneObjectPart part in partList) |
1451 | { | 1451 | { |
1452 | SceneObjectPart newPart; | ||
1452 | if (part.UUID != m_rootPart.UUID) | 1453 | if (part.UUID != m_rootPart.UUID) |
1453 | { | 1454 | { |
1454 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1455 | newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1455 | newPart.LinkNum = part.LinkNum; | 1456 | newPart.LinkNum = part.LinkNum; |
1456 | } | 1457 | } |
1458 | else | ||
1459 | { | ||
1460 | newPart = dupe.m_rootPart; | ||
1461 | } | ||
1457 | 1462 | ||
1458 | // Need to duplicate the physics actor as well | 1463 | // Need to duplicate the physics actor as well |
1459 | if (part.PhysActor != null && userExposed) | 1464 | if (part.PhysActor != null && userExposed) |
1460 | { | 1465 | { |
1461 | PrimitiveBaseShape pbs = part.Shape; | 1466 | PrimitiveBaseShape pbs = part.Shape; |
1462 | 1467 | ||
1463 | part.PhysActor | 1468 | newPart.PhysActor |
1464 | = m_scene.PhysicsScene.AddPrimShape( | 1469 | = m_scene.PhysicsScene.AddPrimShape( |
1470 | part.LocalId, | ||
1465 | string.Format("{0}/{1}", part.Name, part.UUID), | 1471 | string.Format("{0}/{1}", part.Name, part.UUID), |
1466 | pbs, | 1472 | pbs, |
1467 | part.AbsolutePosition, | 1473 | part.AbsolutePosition, |
@@ -1469,8 +1475,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1469 | part.RotationOffset, | 1475 | part.RotationOffset, |
1470 | part.PhysActor.IsPhysical); | 1476 | part.PhysActor.IsPhysical); |
1471 | 1477 | ||
1472 | part.PhysActor.LocalID = part.LocalId; | 1478 | newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); |
1473 | part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); | ||
1474 | } | 1479 | } |
1475 | } | 1480 | } |
1476 | 1481 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a215b20..c6d8c73 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1582,6 +1582,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1582 | if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) | 1582 | if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) |
1583 | { | 1583 | { |
1584 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( | 1584 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( |
1585 | LocalId, | ||
1585 | string.Format("{0}/{1}", Name, UUID), | 1586 | string.Format("{0}/{1}", Name, UUID), |
1586 | Shape, | 1587 | Shape, |
1587 | AbsolutePosition, | 1588 | AbsolutePosition, |
@@ -1594,7 +1595,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1594 | { | 1595 | { |
1595 | PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info | 1596 | PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info |
1596 | PhysActor.SOPDescription = this.Description; | 1597 | PhysActor.SOPDescription = this.Description; |
1597 | PhysActor.LocalID = LocalId; | ||
1598 | DoPhysicsPropertyUpdate(RigidBody, true); | 1598 | DoPhysicsPropertyUpdate(RigidBody, true); |
1599 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); | 1599 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); |
1600 | } | 1600 | } |
@@ -4410,6 +4410,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4410 | { | 4410 | { |
4411 | // It's not phantom anymore. So make sure the physics engine get's knowledge of it | 4411 | // It's not phantom anymore. So make sure the physics engine get's knowledge of it |
4412 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( | 4412 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( |
4413 | LocalId, | ||
4413 | string.Format("{0}/{1}", Name, UUID), | 4414 | string.Format("{0}/{1}", Name, UUID), |
4414 | Shape, | 4415 | Shape, |
4415 | AbsolutePosition, | 4416 | AbsolutePosition, |
@@ -4420,7 +4421,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4420 | pa = PhysActor; | 4421 | pa = PhysActor; |
4421 | if (pa != null) | 4422 | if (pa != null) |
4422 | { | 4423 | { |
4423 | pa.LocalID = LocalId; | ||
4424 | DoPhysicsPropertyUpdate(UsePhysics, true); | 4424 | DoPhysicsPropertyUpdate(UsePhysics, true); |
4425 | if (m_parentGroup != null) | 4425 | if (m_parentGroup != null) |
4426 | { | 4426 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f6295b1..80aafd0 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3295,7 +3295,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3295 | Vector3 pVec = AbsolutePosition; | 3295 | Vector3 pVec = AbsolutePosition; |
3296 | 3296 | ||
3297 | // Old bug where the height was in centimeters instead of meters | 3297 | // Old bug where the height was in centimeters instead of meters |
3298 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, | 3298 | m_physicsActor = scene.AddAvatar(LocalId, Firstname + "." + Lastname, pVec, |
3299 | new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying); | 3299 | new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying); |
3300 | 3300 | ||
3301 | scene.AddPhysicsActorTaint(m_physicsActor); | 3301 | scene.AddPhysicsActorTaint(m_physicsActor); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 42efd67..a5bba4f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -417,9 +417,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
417 | public string ParcelVoiceInfoRequest(Scene scene, string request, string path, string param, | 417 | public string ParcelVoiceInfoRequest(Scene scene, string request, string path, string param, |
418 | UUID agentID, Caps caps) | 418 | UUID agentID, Caps caps) |
419 | { | 419 | { |
420 | // m_log.DebugFormat( | 420 | m_log.DebugFormat( |
421 | // "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", | 421 | "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", |
422 | // scene.RegionInfo.RegionName, agentID); | 422 | scene.RegionInfo.RegionName, agentID); |
423 | 423 | ||
424 | ScenePresence avatar = scene.GetScenePresence(agentID); | 424 | ScenePresence avatar = scene.GetScenePresence(agentID); |
425 | string avatarName = avatar.Name; | 425 | string avatarName = avatar.Name; |
@@ -885,4 +885,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
885 | 885 | ||
886 | #endregion | 886 | #endregion |
887 | } | 887 | } |
888 | } \ No newline at end of file | 888 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 880c3ea..1c36e55 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -142,7 +142,12 @@ namespace OpenSim.Region.Physics.Manager | |||
142 | 142 | ||
143 | public abstract PrimitiveBaseShape Shape { set; } | 143 | public abstract PrimitiveBaseShape Shape { set; } |
144 | 144 | ||
145 | public abstract uint LocalID { set; } | 145 | uint m_baseLocalID; |
146 | public virtual uint LocalID | ||
147 | { | ||
148 | set { m_baseLocalID = value; } | ||
149 | get { return m_baseLocalID; } | ||
150 | } | ||
146 | 151 | ||
147 | public abstract bool Grabbed { set; } | 152 | public abstract bool Grabbed { set; } |
148 | 153 | ||
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 217d307..54c50f8 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -66,6 +66,13 @@ namespace OpenSim.Region.Physics.Manager | |||
66 | 66 | ||
67 | public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); | 67 | public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); |
68 | 68 | ||
69 | public virtual PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 size, bool isFlying) | ||
70 | { | ||
71 | PhysicsActor ret = AddAvatar(avName, position, size, isFlying); | ||
72 | if (ret != null) ret.LocalID = localID; | ||
73 | return ret; | ||
74 | } | ||
75 | |||
69 | public abstract void RemoveAvatar(PhysicsActor actor); | 76 | public abstract void RemoveAvatar(PhysicsActor actor); |
70 | 77 | ||
71 | public abstract void RemovePrim(PhysicsActor prim); | 78 | public abstract void RemovePrim(PhysicsActor prim); |
@@ -75,6 +82,14 @@ namespace OpenSim.Region.Physics.Manager | |||
75 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 82 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
76 | Vector3 size, Quaternion rotation, bool isPhysical); | 83 | Vector3 size, Quaternion rotation, bool isPhysical); |
77 | 84 | ||
85 | public virtual PhysicsActor AddPrimShape(uint localID, string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
86 | Vector3 size, Quaternion rotation, bool isPhysical) | ||
87 | { | ||
88 | PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical); | ||
89 | if (ret != null) ret.LocalID = localID; | ||
90 | return ret; | ||
91 | } | ||
92 | |||
78 | public virtual float TimeDilation | 93 | public virtual float TimeDilation |
79 | { | 94 | { |
80 | get { return 1.0f; } | 95 | get { return 1.0f; } |