diff options
Merge branch 'master' into careminster-presence-refactor
The modules will need to be updated for this to compile and run again. Please
don't use until I do the companion commit to modules later on.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
14 files changed, 149 insertions, 150 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs index ddc3dd7..c72acc3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs | |||
@@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization; | |||
33 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
34 | 34 | ||
35 | namespace OpenSim.Region.CoreModules.World.Archiver | 35 | namespace OpenSim.Region.CoreModules.World.Archiver |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Helper methods for archive manipulation | 38 | /// Helper methods for archive manipulation |
39 | /// </summary> | 39 | /// </summary> |
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
50 | public static string CreateObjectFilename(SceneObjectGroup sog) | 50 | public static string CreateObjectFilename(SceneObjectGroup sog) |
51 | { | 51 | { |
52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); | 52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); |
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Create the path used to store an object in an OpenSim Archive. | 56 | /// Create the path used to store an object in an OpenSim Archive. |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
62 | public static string CreateObjectPath(SceneObjectGroup sog) | 62 | public static string CreateObjectPath(SceneObjectGroup sog) |
63 | { | 63 | { |
64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); | 64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Resolve path to a working FileStream | 68 | /// Resolve path to a working FileStream |
@@ -123,6 +123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
123 | 123 | ||
124 | // return new BufferedStream(file, (int) response.ContentLength); | 124 | // return new BufferedStream(file, (int) response.ContentLength); |
125 | return new BufferedStream(file, 1000000); | 125 | return new BufferedStream(file, 1000000); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | } \ No newline at end of file | 128 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index b25636f..283b33b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
102 | { | 102 | { |
103 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); | 103 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); |
104 | 104 | ||
105 | List<EntityBase> entities = m_scene.GetEntities(); | 105 | EntityBase[] entities = m_scene.GetEntities(); |
106 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 106 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
107 | 107 | ||
108 | /* | 108 | /* |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 58698ee..3342164 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -48,6 +48,7 @@ using OpenSim.Tests.Common.Setup; | |||
48 | using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; | 48 | using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; |
49 | using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader; | 49 | using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader; |
50 | using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter; | 50 | using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter; |
51 | using RegionSettings = OpenSim.Framework.RegionSettings; | ||
51 | 52 | ||
52 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests | 53 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests |
53 | { | 54 | { |
@@ -135,7 +136,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
135 | 136 | ||
136 | SceneObjectPart part2 = CreateSceneObjectPart2(); | 137 | SceneObjectPart part2 = CreateSceneObjectPart2(); |
137 | 138 | ||
138 | AssetNotecard nc = new AssetNotecard("Hello World!"); | 139 | AssetNotecard nc = new AssetNotecard(); |
140 | nc.BodyText = "Hello World!"; | ||
141 | nc.Encode(); | ||
139 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); | 142 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); |
140 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); | 143 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); |
141 | AssetBase ncAsset | 144 | AssetBase ncAsset |
@@ -215,7 +218,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
215 | public void TestLoadOarV0_2() | 218 | public void TestLoadOarV0_2() |
216 | { | 219 | { |
217 | TestHelper.InMethod(); | 220 | TestHelper.InMethod(); |
218 | //log4net.Config.XmlConfigurator.Configure(); | 221 | // log4net.Config.XmlConfigurator.Configure(); |
219 | 222 | ||
220 | MemoryStream archiveWriteStream = new MemoryStream(); | 223 | MemoryStream archiveWriteStream = new MemoryStream(); |
221 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); | 224 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index f62ec1b..5bd72ee 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
72 | #pragma warning restore 0429 | 72 | #pragma warning restore 0429 |
73 | 73 | ||
74 | /// <value> | 74 | /// <value> |
75 | /// Local land ids at specified region co-ordinates (region size / 4) | 75 | /// Local land ids at specified region co-ordinates (region size / 4) |
76 | /// </value> | 76 | /// </value> |
77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; | 77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; |
78 | 78 | ||
79 | /// <value> | 79 | /// <value> |
80 | /// Land objects keyed by local id | 80 | /// Land objects keyed by local id |
81 | /// </value> | 81 | /// </value> |
82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); | 82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); |
83 | 83 | ||
@@ -94,8 +94,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
94 | 94 | ||
95 | #region INonSharedRegionModule Members | 95 | #region INonSharedRegionModule Members |
96 | 96 | ||
97 | public Type ReplaceableInterface | 97 | public Type ReplaceableInterface |
98 | { | 98 | { |
99 | get { return null; } | 99 | get { return null; } |
100 | } | 100 | } |
101 | 101 | ||
@@ -200,7 +200,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
200 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 200 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
201 | forcedPosition = null; | 201 | forcedPosition = null; |
202 | } | 202 | } |
203 | //if we are far away, teleport | 203 | //if we are far away, teleport |
204 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) | 204 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) |
205 | { | 205 | { |
206 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 206 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
@@ -329,8 +329,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
329 | } | 329 | } |
330 | } | 330 | } |
331 | 331 | ||
332 | |||
333 | |||
334 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) | 332 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) |
335 | { | 333 | { |
336 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; | 334 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; |
@@ -344,7 +342,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
344 | { | 342 | { |
345 | avatar.ControllingClient.SendAlertMessage( | 343 | avatar.ControllingClient.SendAlertMessage( |
346 | "You are not allowed on this parcel because the land owner has restricted access."); | 344 | "You are not allowed on this parcel because the land owner has restricted access."); |
347 | |||
348 | } | 345 | } |
349 | 346 | ||
350 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) | 347 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) |
@@ -456,7 +453,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
456 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | 453 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
457 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) | 454 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) |
458 | { | 455 | { |
459 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, | 456 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, |
460 | m_scene.RegionInfo.RegionID); | 457 | m_scene.RegionInfo.RegionID); |
461 | //They are going under the safety line! | 458 | //They are going under the safety line! |
462 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | 459 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) |
@@ -660,7 +657,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
660 | 657 | ||
661 | if (x_float > Constants.RegionSize || x_float < 0 || y_float > Constants.RegionSize || y_float < 0) | 658 | if (x_float > Constants.RegionSize || x_float < 0 || y_float > Constants.RegionSize || y_float < 0) |
662 | return null; | 659 | return null; |
663 | 660 | ||
664 | try | 661 | try |
665 | { | 662 | { |
666 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); | 663 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); |
@@ -675,7 +672,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
675 | { | 672 | { |
676 | return null; | 673 | return null; |
677 | } | 674 | } |
678 | 675 | ||
679 | lock (m_landList) | 676 | lock (m_landList) |
680 | { | 677 | { |
681 | // Corner case. If an autoreturn happens during sim startup | 678 | // Corner case. If an autoreturn happens during sim startup |
@@ -695,7 +692,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
695 | // they happen every time at border crossings | 692 | // they happen every time at border crossings |
696 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 693 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
697 | } | 694 | } |
698 | 695 | ||
699 | lock (m_landIDList) | 696 | lock (m_landIDList) |
700 | { | 697 | { |
701 | try | 698 | try |
@@ -749,7 +746,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
749 | 746 | ||
750 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) | 747 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) |
751 | { | 748 | { |
752 | |||
753 | lock (m_landList) | 749 | lock (m_landList) |
754 | { | 750 | { |
755 | foreach (LandObject p in m_landList.Values) | 751 | foreach (LandObject p in m_landList.Values) |
@@ -802,7 +798,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
802 | public void EventManagerOnParcelPrimCountUpdate() | 798 | public void EventManagerOnParcelPrimCountUpdate() |
803 | { | 799 | { |
804 | ResetAllLandPrimCounts(); | 800 | ResetAllLandPrimCounts(); |
805 | foreach (EntityBase obj in m_scene.Entities) | 801 | EntityBase[] entities = m_scene.Entities.GetEntities(); |
802 | foreach (EntityBase obj in entities) | ||
806 | { | 803 | { |
807 | if (obj != null) | 804 | if (obj != null) |
808 | { | 805 | { |
@@ -943,7 +940,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
943 | return; | 940 | return; |
944 | } | 941 | } |
945 | } | 942 | } |
946 | 943 | ||
947 | lock (m_landList) | 944 | lock (m_landList) |
948 | { | 945 | { |
949 | foreach (ILandObject slaveLandObject in selectedLandObjects) | 946 | foreach (ILandObject slaveLandObject in selectedLandObjects) |
@@ -1089,7 +1086,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1089 | temp.Add(currentParcel); | 1086 | temp.Add(currentParcel); |
1090 | } | 1087 | } |
1091 | } | 1088 | } |
1092 | |||
1093 | } | 1089 | } |
1094 | } | 1090 | } |
1095 | 1091 | ||
@@ -1132,7 +1128,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1132 | join(west, south, east, north, remote_client.AgentId); | 1128 | join(west, south, east, north, remote_client.AgentId); |
1133 | } | 1129 | } |
1134 | 1130 | ||
1135 | public void ClientOnParcelSelectObjects(int local_id, int request_type, | 1131 | public void ClientOnParcelSelectObjects(int local_id, int request_type, |
1136 | List<UUID> returnIDs, IClientAPI remote_client) | 1132 | List<UUID> returnIDs, IClientAPI remote_client) |
1137 | { | 1133 | { |
1138 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); | 1134 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); |
@@ -1382,31 +1378,31 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1382 | { | 1378 | { |
1383 | return RemoteParcelRequest(request, path, param, agentID, caps); | 1379 | return RemoteParcelRequest(request, path, param, agentID, caps); |
1384 | })); | 1380 | })); |
1385 | UUID parcelCapID = UUID.Random(); | 1381 | UUID parcelCapID = UUID.Random(); |
1386 | caps.RegisterHandler("ParcelPropertiesUpdate", | 1382 | caps.RegisterHandler("ParcelPropertiesUpdate", |
1387 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, | 1383 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, |
1388 | delegate(string request, string path, string param, | 1384 | delegate(string request, string path, string param, |
1389 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 1385 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
1390 | { | 1386 | { |
1391 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); | 1387 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); |
1392 | })); | 1388 | })); |
1393 | } | 1389 | } |
1394 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) | 1390 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) |
1395 | { | 1391 | { |
1396 | IClientAPI client; | 1392 | IClientAPI client; |
1397 | if ( ! m_scene.TryGetClient(agentID, out client) ) { | 1393 | if (! m_scene.TryGetClient(agentID, out client)) { |
1398 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() ); | 1394 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString()); |
1399 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1395 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1400 | } | 1396 | } |
1401 | 1397 | ||
1402 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); | 1398 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); |
1403 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); | 1399 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); |
1404 | 1400 | ||
1405 | properties.Deserialize(args); | 1401 | properties.Deserialize(args); |
1406 | 1402 | ||
1407 | LandUpdateArgs land_update = new LandUpdateArgs(); | 1403 | LandUpdateArgs land_update = new LandUpdateArgs(); |
1408 | int parcelID = properties.LocalID; | 1404 | int parcelID = properties.LocalID; |
1409 | land_update.AuthBuyerID = properties.AuthBuyerID; | 1405 | land_update.AuthBuyerID = properties.AuthBuyerID; |
1410 | land_update.Category = properties.Category; | 1406 | land_update.Category = properties.Category; |
1411 | land_update.Desc = properties.Desc; | 1407 | land_update.Desc = properties.Desc; |
1412 | land_update.GroupID = properties.GroupID; | 1408 | land_update.GroupID = properties.GroupID; |
@@ -1423,15 +1419,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1423 | land_update.SnapshotID = properties.SnapshotID; | 1419 | land_update.SnapshotID = properties.SnapshotID; |
1424 | land_update.UserLocation = properties.UserLocation; | 1420 | land_update.UserLocation = properties.UserLocation; |
1425 | land_update.UserLookAt = properties.UserLookAt; | 1421 | land_update.UserLookAt = properties.UserLookAt; |
1426 | land_update.MediaDescription = properties.MediaDesc; | 1422 | land_update.MediaDescription = properties.MediaDesc; |
1427 | land_update.MediaType = properties.MediaType; | 1423 | land_update.MediaType = properties.MediaType; |
1428 | land_update.MediaWidth = properties.MediaWidth; | 1424 | land_update.MediaWidth = properties.MediaWidth; |
1429 | land_update.MediaHeight = properties.MediaHeight; | 1425 | land_update.MediaHeight = properties.MediaHeight; |
1430 | land_update.MediaLoop = properties.MediaLoop; | 1426 | land_update.MediaLoop = properties.MediaLoop; |
1431 | land_update.ObscureMusic = properties.ObscureMusic; | 1427 | land_update.ObscureMusic = properties.ObscureMusic; |
1432 | land_update.ObscureMedia = properties.ObscureMedia; | 1428 | land_update.ObscureMedia = properties.ObscureMedia; |
1433 | 1429 | ||
1434 | ILandObject land; | 1430 | ILandObject land; |
1435 | lock (m_landList) | 1431 | lock (m_landList) |
1436 | { | 1432 | { |
1437 | m_landList.TryGetValue(parcelID, out land); | 1433 | m_landList.TryGetValue(parcelID, out land); |
@@ -1439,15 +1435,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1439 | 1435 | ||
1440 | if (land != null) | 1436 | if (land != null) |
1441 | { | 1437 | { |
1442 | land.UpdateLandProperties(land_update, client); | 1438 | land.UpdateLandProperties(land_update, client); |
1443 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); | 1439 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); |
1444 | } | 1440 | } |
1445 | else | 1441 | else |
1446 | { | 1442 | { |
1447 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); | 1443 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); |
1448 | } | 1444 | } |
1449 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1445 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1450 | } | 1446 | } |
1451 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the | 1447 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the |
1452 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. | 1448 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. |
1453 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x | 1449 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x |
@@ -1524,19 +1520,19 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1524 | if (parcelID == UUID.Zero) | 1520 | if (parcelID == UUID.Zero) |
1525 | return; | 1521 | return; |
1526 | 1522 | ||
1527 | ExtendedLandData data = | 1523 | ExtendedLandData data = |
1528 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), | 1524 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), |
1529 | delegate(string id) | 1525 | delegate(string id) |
1530 | { | 1526 | { |
1531 | UUID parcel = UUID.Zero; | 1527 | UUID parcel = UUID.Zero; |
1532 | UUID.TryParse(id, out parcel); | 1528 | UUID.TryParse(id, out parcel); |
1533 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 1529 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
1534 | ExtendedLandData extLandData = new ExtendedLandData(); | 1530 | ExtendedLandData extLandData = new ExtendedLandData(); |
1535 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, | 1531 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, |
1536 | out extLandData.X, out extLandData.Y); | 1532 | out extLandData.X, out extLandData.Y); |
1537 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", | 1533 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", |
1538 | extLandData.RegionHandle, extLandData.X, extLandData.Y); | 1534 | extLandData.RegionHandle, extLandData.X, extLandData.Y); |
1539 | 1535 | ||
1540 | // for this region or for somewhere else? | 1536 | // for this region or for somewhere else? |
1541 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) | 1537 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) |
1542 | { | 1538 | { |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 1b2cabb..bd1dd66 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
229 | newData.SnapshotID = args.SnapshotID; | 229 | newData.SnapshotID = args.SnapshotID; |
230 | newData.UserLocation = args.UserLocation; | 230 | newData.UserLocation = args.UserLocation; |
231 | newData.UserLookAt = args.UserLookAt; | 231 | newData.UserLookAt = args.UserLookAt; |
232 | newData.MediaType = args.MediaType; | 232 | newData.MediaType = args.MediaType; |
233 | newData.MediaDescription = args.MediaDescription; | 233 | newData.MediaDescription = args.MediaDescription; |
234 | newData.MediaWidth = args.MediaWidth; | 234 | newData.MediaWidth = args.MediaWidth; |
235 | newData.MediaHeight = args.MediaHeight; | 235 | newData.MediaHeight = args.MediaHeight; |
236 | newData.MediaLoop = args.MediaLoop; | 236 | newData.MediaLoop = args.MediaLoop; |
237 | newData.ObscureMusic = args.ObscureMusic; | 237 | newData.ObscureMusic = args.ObscureMusic; |
238 | newData.ObscureMedia = args.ObscureMedia; | 238 | newData.ObscureMedia = args.ObscureMedia; |
239 | 239 | ||
240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
241 | 241 | ||
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 82ad109..7c5d044 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -54,11 +54,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
54 | { | 54 | { |
55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] | 55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] |
56 | public class MoapModule : INonSharedRegionModule, IMoapModule | 56 | public class MoapModule : INonSharedRegionModule, IMoapModule |
57 | { | 57 | { |
58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | public string Name { get { return "MoapModule"; } } | 60 | public string Name { get { return "MoapModule"; } } |
61 | public Type ReplaceableInterface { get { return null; } } | 61 | public Type ReplaceableInterface { get { return null; } } |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// Is this module enabled? | 64 | /// Is this module enabled? |
@@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
78 | /// <summary> | 78 | /// <summary> |
79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. | 79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. |
80 | /// </summary> | 80 | /// </summary> |
81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); | 81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path | 84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path |
85 | /// </summary> | 85 | /// </summary> |
86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); | 86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate | 89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate |
90 | /// </summary> | 90 | /// </summary> |
91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); | 91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); |
92 | 92 | ||
93 | public void Initialise(IConfigSource configSource) | 93 | public void Initialise(IConfigSource configSource) |
94 | { | 94 | { |
@@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; | 129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; |
130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; | 130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; |
131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; | 131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; |
132 | } | 132 | } |
133 | 133 | ||
134 | public void OnRegisterCaps(UUID agentID, Caps caps) | 134 | public void OnRegisterCaps(UUID agentID, Caps caps) |
135 | { | 135 | { |
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
159 | caps.RegisterHandler( | 159 | caps.RegisterHandler( |
160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); | 160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | public void OnDeregisterCaps(UUID agentID, Caps caps) | 164 | public void OnDeregisterCaps(UUID agentID, Caps caps) |
165 | { | 165 | { |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
179 | } | 179 | } |
180 | 180 | ||
181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) | 181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) |
182 | { | 182 | { |
183 | if (original.Shape.Media != null) | 183 | if (original.Shape.Media != null) |
184 | { | 184 | { |
185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); | 185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); |
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
195 | } | 195 | } |
196 | 196 | ||
197 | copy.Shape.Media = dupeMedia; | 197 | copy.Shape.Media = dupeMedia; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) | 201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) |
@@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
211 | me = null; | 211 | me = null; |
212 | } | 212 | } |
213 | else | 213 | else |
214 | { | 214 | { |
215 | lock (media) | 215 | lock (media) |
216 | me = media[face]; | 216 | me = media[face]; |
217 | 217 | ||
218 | // TODO: Really need a proper copy constructor down in libopenmetaverse | 218 | // TODO: Really need a proper copy constructor down in libopenmetaverse |
219 | if (me != null) | 219 | if (me != null) |
@@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
227 | 227 | ||
228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) | 228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) |
229 | { | 229 | { |
230 | CheckFaceParam(part, face); | 230 | CheckFaceParam(part, face); |
231 | 231 | ||
232 | if (null == part.Shape.Media) | 232 | if (null == part.Shape.Media) |
233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); | 233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); |
234 | 234 | ||
235 | lock (part.Shape.Media) | 235 | lock (part.Shape.Media) |
236 | part.Shape.Media[face] = me; | 236 | part.Shape.Media[face] = me; |
237 | 237 | ||
238 | UpdateMediaUrl(part, UUID.Zero); | 238 | UpdateMediaUrl(part, UUID.Zero); |
239 | part.ScheduleFullUpdate(); | 239 | part.ScheduleFullUpdate(); |
240 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 240 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
241 | } | 241 | } |
242 | 242 | ||
243 | public void ClearMediaEntry(SceneObjectPart part, int face) | 243 | public void ClearMediaEntry(SceneObjectPart part, int face) |
@@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
256 | /// <returns></returns> | 256 | /// <returns></returns> |
257 | protected string HandleObjectMediaMessage( | 257 | protected string HandleObjectMediaMessage( |
258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
259 | { | 259 | { |
260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); | 260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); |
261 | 261 | ||
262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
@@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
266 | if (omm.Request is ObjectMediaRequest) | 266 | if (omm.Request is ObjectMediaRequest) |
267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); | 267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); |
268 | else if (omm.Request is ObjectMediaUpdate) | 268 | else if (omm.Request is ObjectMediaUpdate) |
269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); | 269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); |
270 | 270 | ||
271 | throw new Exception( | 271 | throw new Exception( |
272 | string.Format( | 272 | string.Format( |
273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", | 273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", |
274 | omm.Request.GetType())); | 274 | omm.Request.GetType())); |
275 | } | 275 | } |
276 | 276 | ||
277 | /// <summary> | 277 | /// <summary> |
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
279 | /// </summary> | 279 | /// </summary> |
280 | /// <param name="omr"></param> | 280 | /// <param name="omr"></param> |
281 | /// <returns></returns> | 281 | /// <returns></returns> |
282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) | 282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) |
283 | { | 283 | { |
284 | UUID primId = omr.PrimID; | 284 | UUID primId = omr.PrimID; |
285 | 285 | ||
@@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
318 | /// <param name="path">Path on which this request was made</param> | 318 | /// <param name="path">Path on which this request was made</param> |
319 | /// <param name="omu">/param> | 319 | /// <param name="omu">/param> |
320 | /// <returns></returns> | 320 | /// <returns></returns> |
321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) | 321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) |
322 | { | 322 | { |
323 | UUID primId = omu.PrimID; | 323 | UUID primId = omu.PrimID; |
324 | 324 | ||
@@ -330,9 +330,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", | 330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", |
331 | primId, m_scene.RegionInfo.RegionName); | 331 | primId, m_scene.RegionInfo.RegionName); |
332 | return string.Empty; | 332 | return string.Empty; |
333 | } | 333 | } |
334 | 334 | ||
335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); | 335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); |
336 | 336 | ||
337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) | 337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) |
338 | // { | 338 | // { |
@@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
374 | part.Shape.Textures = te; | 374 | part.Shape.Textures = te; |
375 | // m_log.DebugFormat( | 375 | // m_log.DebugFormat( |
376 | // "[MOAP]: Media flags for face {0} is {1}", | 376 | // "[MOAP]: Media flags for face {0} is {1}", |
377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); | 377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | } | 380 | } |
381 | else | 381 | else |
382 | { | 382 | { |
383 | // We need to go through the media textures one at a time to make sure that we have permission | 383 | // We need to go through the media textures one at a time to make sure that we have permission |
384 | // to change them | 384 | // to change them |
385 | 385 | ||
386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get | 386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get |
387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry | 387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry |
@@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
391 | lock (media) | 391 | lock (media) |
392 | { | 392 | { |
393 | for (int i = 0; i < media.Count; i++) | 393 | for (int i = 0; i < media.Count; i++) |
394 | { | 394 | { |
395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) | 395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) |
396 | { | 396 | { |
397 | media[i] = omu.FaceMedia[i]; | 397 | media[i] = omu.FaceMedia[i]; |
398 | 398 | ||
399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal | 399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal |
400 | // texture update, so we don't need to worry about clearing MediaFlags here. | 400 | // texture update, so we don't need to worry about clearing MediaFlags here. |
401 | if (null == media[i]) | 401 | if (null == media[i]) |
402 | continue; | 402 | continue; |
403 | 403 | ||
404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); | 404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); |
405 | face.MediaFlags = true; | 405 | face.MediaFlags = true; |
406 | 406 | ||
407 | // m_log.DebugFormat( | 407 | // m_log.DebugFormat( |
408 | // "[MOAP]: Media flags for face {0} is {1}", | 408 | // "[MOAP]: Media flags for face {0} is {1}", |
@@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
414 | 414 | ||
415 | part.Shape.Textures = te; | 415 | part.Shape.Textures = te; |
416 | 416 | ||
417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) | 417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) |
418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); | 418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); |
419 | } | 419 | } |
420 | 420 | ||
421 | UpdateMediaUrl(part, agentId); | 421 | UpdateMediaUrl(part, agentId); |
422 | 422 | ||
423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. | 423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. |
424 | part.ScheduleFullUpdate(); | 424 | part.ScheduleFullUpdate(); |
@@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
439 | /// <returns></returns> | 439 | /// <returns></returns> |
440 | protected string HandleObjectMediaNavigateMessage( | 440 | protected string HandleObjectMediaNavigateMessage( |
441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
442 | { | 442 | { |
443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); | 443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); |
444 | 444 | ||
445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); | 446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); |
447 | omn.Deserialize(osd); | 447 | omn.Deserialize(osd); |
448 | 448 | ||
449 | UUID primId = omn.PrimID; | 449 | UUID primId = omn.PrimID; |
450 | 450 | ||
451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); | 451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); |
452 | 452 | ||
453 | if (null == part) | 453 | if (null == part) |
454 | { | 454 | { |
@@ -456,12 +456,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", | 456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", |
457 | primId, m_scene.RegionInfo.RegionName); | 457 | primId, m_scene.RegionInfo.RegionName); |
458 | return string.Empty; | 458 | return string.Empty; |
459 | } | 459 | } |
460 | 460 | ||
461 | UUID agentId = default(UUID); | 461 | UUID agentId = default(UUID); |
462 | 462 | ||
463 | lock (m_omuCapUsers) | 463 | lock (m_omuCapUsers) |
464 | agentId = m_omuCapUsers[path]; | 464 | agentId = m_omuCapUsers[path]; |
465 | 465 | ||
466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) | 466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) |
467 | return string.Empty; | 467 | return string.Empty; |
@@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
484 | return string.Empty; | 484 | return string.Empty; |
485 | 485 | ||
486 | if (me.EnableWhiteList) | 486 | if (me.EnableWhiteList) |
487 | { | 487 | { |
488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) | 488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) |
489 | { | 489 | { |
490 | // m_log.DebugFormat( | 490 | // m_log.DebugFormat( |
@@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
493 | 493 | ||
494 | return string.Empty; | 494 | return string.Empty; |
495 | } | 495 | } |
496 | } | 496 | } |
497 | 497 | ||
498 | me.CurrentURL = omn.URL; | 498 | me.CurrentURL = omn.URL; |
499 | 499 | ||
500 | UpdateMediaUrl(part, agentId); | 500 | UpdateMediaUrl(part, agentId); |
501 | 501 | ||
502 | part.ScheduleFullUpdate(); | 502 | part.ScheduleFullUpdate(); |
503 | 503 | ||
504 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 504 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
505 | 505 | ||
506 | return OSDParser.SerializeLLSDXmlString(new OSD()); | 506 | return OSDParser.SerializeLLSDXmlString(new OSD()); |
507 | } | 507 | } |
508 | 508 | ||
509 | /// <summary> | 509 | /// <summary> |
510 | /// Check that the face number is valid for the given prim. | 510 | /// Check that the face number is valid for the given prim. |
@@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
519 | int maxFaces = part.GetNumberOfSides() - 1; | 519 | int maxFaces = part.GetNumberOfSides() - 1; |
520 | if (face > maxFaces) | 520 | if (face > maxFaces) |
521 | throw new ArgumentException( | 521 | throw new ArgumentException( |
522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); | 522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); |
523 | } | 523 | } |
524 | 524 | ||
525 | /// <summary> | 525 | /// <summary> |
@@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
542 | string rawVersion = part.MediaUrl.Substring(5, 10); | 542 | string rawVersion = part.MediaUrl.Substring(5, 10); |
543 | int version = int.Parse(rawVersion); | 543 | int version = int.Parse(rawVersion); |
544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); | 544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); |
545 | } | 545 | } |
546 | 546 | ||
547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); | 547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); |
548 | } | 548 | } |
549 | 549 | ||
550 | /// <summary> | 550 | /// <summary> |
@@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
554 | /// <param name="whitelist"></param> | 554 | /// <param name="whitelist"></param> |
555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> | 555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> |
556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) | 556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) |
557 | { | 557 | { |
558 | Uri url = new Uri(rawUrl); | 558 | Uri url = new Uri(rawUrl); |
559 | 559 | ||
560 | foreach (string origWlUrl in whitelist) | 560 | foreach (string origWlUrl in whitelist) |
@@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
575 | if (url.Host.Contains(wlUrl)) | 575 | if (url.Host.Contains(wlUrl)) |
576 | { | 576 | { |
577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); | 577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); |
578 | return true; | 578 | return true; |
579 | } | 579 | } |
580 | } | 580 | } |
581 | else | 581 | else |
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
588 | return true; | 588 | return true; |
589 | } | 589 | } |
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | return false; | 593 | return false; |
594 | } | 594 | } |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 12750c5..db50339 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
49 | protected Scene m_scene = null; | 49 | protected Scene m_scene = null; |
50 | protected IDialogModule m_dialogModule; | 50 | protected IDialogModule m_dialogModule; |
51 | 51 | ||
52 | public string Name { get { return "Object BuySell Module"; } } | 52 | public string Name { get { return "Object BuySell Module"; } } |
53 | public Type ReplaceableInterface { get { return null; } } | 53 | public Type ReplaceableInterface { get { return null; } } |
54 | 54 | ||
55 | public void Initialise(IConfigSource source) {} | 55 | public void Initialise(IConfigSource source) {} |
56 | 56 | ||
@@ -78,8 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
78 | 78 | ||
79 | public void SubscribeToClientEvents(IClientAPI client) | 79 | public void SubscribeToClientEvents(IClientAPI client) |
80 | { | 80 | { |
81 | client.OnObjectSaleInfo += ObjectSaleInfo; | 81 | client.OnObjectSaleInfo += ObjectSaleInfo; |
82 | } | 82 | } |
83 | 83 | ||
84 | protected void ObjectSaleInfo( | 84 | protected void ObjectSaleInfo( |
85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | 85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) |
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
99 | part.ParentGroup.HasGroupChanged = true; | 99 | part.ParentGroup.HasGroupChanged = true; |
100 | 100 | ||
101 | part.GetProperties(client); | 101 | part.GetProperties(client); |
102 | } | 102 | } |
103 | 103 | ||
104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) | 104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) |
105 | { | 105 | { |
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
225 | } | 225 | } |
226 | else | 226 | else |
227 | { | 227 | { |
228 | if (m_dialogModule != null) | 228 | if (m_dialogModule != null) |
229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); | 229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); |
230 | return false; | 230 | return false; |
231 | } | 231 | } |
@@ -261,6 +261,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
261 | } | 261 | } |
262 | 262 | ||
263 | return true; | 263 | return true; |
264 | } | 264 | } |
265 | } | 265 | } |
266 | } \ No newline at end of file | 266 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index b1747ef..ecfd211 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); | 397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); |
398 | 398 | ||
399 | if (m_groupsModule == null) | 399 | if (m_groupsModule == null) |
400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); | 400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); |
401 | 401 | ||
402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); | 402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); |
403 | 403 | ||
404 | // This log line will be commented out when no longer required for debugging | 404 | // This log line will be commented out when no longer required for debugging |
405 | // if (m_moapModule == null) | 405 | // if (m_moapModule == null) |
406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); | 406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); |
407 | } | 407 | } |
408 | 408 | ||
409 | public void Close() | 409 | public void Close() |
@@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) | 1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) |
1909 | { | 1909 | { |
1910 | // m_log.DebugFormat( | 1910 | // m_log.DebugFormat( |
1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", | 1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", |
1912 | // agentID, primID, face); | 1912 | // agentID, primID, face); |
@@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1918 | if (null == part) | 1918 | if (null == part) |
1919 | return false; | 1919 | return false; |
1920 | 1920 | ||
1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); | 1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); |
1922 | 1922 | ||
1923 | // If there is no existing media entry then it can be controlled (in this context, created). | 1923 | // If there is no existing media entry then it can be controlled (in this context, created). |
1924 | if (null == me) | 1924 | if (null == me) |
@@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1929 | // agentID, primID, face, me.ControlPermissions); | 1929 | // agentID, primID, face, me.ControlPermissions); |
1930 | 1930 | ||
1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); | 1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); |
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) | 1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) |
1935 | { | 1935 | { |
@@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1952 | 1952 | ||
1953 | // m_log.DebugFormat( | 1953 | // m_log.DebugFormat( |
1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", | 1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", |
1955 | // agentID, primID, face, me.InteractPermissions); | 1955 | // agentID, primID, face, me.InteractPermissions); |
1956 | 1956 | ||
1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); | 1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); |
1958 | } | 1958 | } |
1959 | 1959 | ||
1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) | 1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) |
1961 | { | 1961 | { |
1962 | // if (IsAdministrator(agentID)) | 1962 | // if (IsAdministrator(agentID)) |
1963 | // return true; | 1963 | // return true; |
1964 | 1964 | ||
1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) | 1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) |
1966 | return true; | 1966 | return true; |
@@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1969 | { | 1969 | { |
1970 | if (agentID == part.OwnerID) | 1970 | if (agentID == part.OwnerID) |
1971 | return true; | 1971 | return true; |
1972 | } | 1972 | } |
1973 | 1973 | ||
1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) | 1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) |
1975 | { | 1975 | { |
1976 | if (IsGroupMember(part.GroupID, agentID, 0)) | 1976 | if (IsGroupMember(part.GroupID, agentID, 0)) |
1977 | return true; | 1977 | return true; |
1978 | } | 1978 | } |
1979 | 1979 | ||
1980 | return false; | 1980 | return false; |
1981 | } | 1981 | } |
1982 | } | 1982 | } |
1983 | } \ No newline at end of file | 1983 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs index bef7fe4..5067ebd 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser | |||
80 | { | 80 | { |
81 | string xmlstream = "<scene>"; | 81 | string xmlstream = "<scene>"; |
82 | 82 | ||
83 | List<EntityBase> EntityList = scene.GetEntities(); | 83 | EntityBase[] EntityList = scene.GetEntities(); |
84 | List<string> EntityXml = new List<string>(); | 84 | List<string> EntityXml = new List<string>(); |
85 | 85 | ||
86 | foreach (EntityBase ent in EntityList) | 86 | foreach (EntityBase ent in EntityList) |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs index 58e4261..98fe493 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs | |||
@@ -165,12 +165,12 @@ namespace OpenSim.Region.CoreModules.World.Serialiser | |||
165 | return SceneXmlLoader.SaveGroupToXml2(grp); | 165 | return SceneXmlLoader.SaveGroupToXml2(grp); |
166 | } | 166 | } |
167 | 167 | ||
168 | public void SavePrimListToXml2(List<EntityBase> entityList, string fileName) | 168 | public void SavePrimListToXml2(EntityBase[] entityList, string fileName) |
169 | { | 169 | { |
170 | SceneXmlLoader.SavePrimListToXml2(entityList, fileName); | 170 | SceneXmlLoader.SavePrimListToXml2(entityList, fileName); |
171 | } | 171 | } |
172 | 172 | ||
173 | public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max) | 173 | public void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max) |
174 | { | 174 | { |
175 | SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); | 175 | SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); |
176 | } | 176 | } |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index d4166d0..4611352 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -816,7 +816,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
816 | { | 816 | { |
817 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); | 817 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); |
818 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); | 818 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); |
819 | } | 819 | } |
820 | 820 | ||
821 | private void StoreUndoState() | 821 | private void StoreUndoState() |
822 | { | 822 | { |
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 9736b73..6bac555 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules | |||
425 | { | 425 | { |
426 | if (m_ready) | 426 | if (m_ready) |
427 | { | 427 | { |
428 | if(m_scene.GetRootAgentCount() > 0) | 428 | if (m_scene.GetRootAgentCount() > 0) |
429 | { | 429 | { |
430 | // Ask wind plugin to generate a LL wind array to be cached locally | 430 | // Ask wind plugin to generate a LL wind array to be cached locally |
431 | // Try not to update this too often, as it may involve array copies | 431 | // Try not to update this too often, as it may involve array copies |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index 57eff8a..1bd1371 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs | |||
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
212 | double[,] hm = whichScene.Heightmap.GetDoubles(); | 212 | double[,] hm = whichScene.Heightmap.GetDoubles(); |
213 | tc = Environment.TickCount; | 213 | tc = Environment.TickCount; |
214 | m_log.Info("[MAPTILE]: Generating Maptile Step 2: Object Volume Profile"); | 214 | m_log.Info("[MAPTILE]: Generating Maptile Step 2: Object Volume Profile"); |
215 | List<EntityBase> objs = whichScene.GetEntities(); | 215 | EntityBase[] objs = whichScene.GetEntities(); |
216 | Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>(); | 216 | Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>(); |
217 | //SortedList<float, RectangleDrawStruct> z_sort = new SortedList<float, RectangleDrawStruct>(); | 217 | //SortedList<float, RectangleDrawStruct> z_sort = new SortedList<float, RectangleDrawStruct>(); |
218 | List<float> z_sortheights = new List<float>(); | 218 | List<float> z_sortheights = new List<float>(); |
@@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; | 228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; |
229 | Color mapdotspot = Color.Gray; // Default color when prim color is white | 229 | Color mapdotspot = Color.Gray; // Default color when prim color is white |
230 | 230 | ||
231 | // Loop over prim in group | 231 | // Loop over prim in group |
232 | List<SceneObjectPart> partList = null; | 232 | List<SceneObjectPart> partList = null; |
233 | lock (mapdot.Children) | 233 | lock (mapdot.Children) |
234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); | 234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f036d85..fbc8a50 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
307 | lock (m_rootAgents) | 307 | lock (m_rootAgents) |
308 | { | 308 | { |
309 | m_rootAgents.Remove(AgentId); | 309 | m_rootAgents.Remove(AgentId); |
310 | if(m_rootAgents.Count == 0) | 310 | if (m_rootAgents.Count == 0) |
311 | StopThread(); | 311 | StopThread(); |
312 | } | 312 | } |
313 | } | 313 | } |