diff options
Diffstat (limited to '')
18 files changed, 170 insertions, 117 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b2df0bd..f071841 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -11873,5 +11873,60 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11873 | dialog.Buttons = buttons; | 11873 | dialog.Buttons = buttons; |
11874 | OutPacket(dialog, ThrottleOutPacketType.Task); | 11874 | OutPacket(dialog, ThrottleOutPacketType.Task); |
11875 | } | 11875 | } |
11876 | |||
11877 | public void StopFlying(ISceneEntity p) | ||
11878 | { | ||
11879 | if (p is ScenePresence) | ||
11880 | { | ||
11881 | ScenePresence presence = p as ScenePresence; | ||
11882 | // It turns out to get the agent to stop flying, you have to feed it stop flying velocities | ||
11883 | // There's no explicit message to send the client to tell it to stop flying.. it relies on the | ||
11884 | // velocity, collision plane and avatar height | ||
11885 | |||
11886 | // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air | ||
11887 | // when the avatar stands up | ||
11888 | |||
11889 | Vector3 pos = presence.AbsolutePosition; | ||
11890 | |||
11891 | if (presence.Appearance.AvatarHeight != 127.0f) | ||
11892 | pos += new Vector3(0f, 0f, (presence.Appearance.AvatarHeight/6f)); | ||
11893 | else | ||
11894 | pos += new Vector3(0f, 0f, (1.56f/6f)); | ||
11895 | |||
11896 | presence.AbsolutePosition = pos; | ||
11897 | |||
11898 | // attach a suitable collision plane regardless of the actual situation to force the LLClient to land. | ||
11899 | // Collision plane below the avatar's position a 6th of the avatar's height is suitable. | ||
11900 | // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a | ||
11901 | // certain amount.. because the LLClient wouldn't land in that situation anyway. | ||
11902 | |||
11903 | // why are we still testing for this really old height value default??? | ||
11904 | if (presence.Appearance.AvatarHeight != 127.0f) | ||
11905 | presence.CollisionPlane = new Vector4(0, 0, 0, pos.Z - presence.Appearance.AvatarHeight/6f); | ||
11906 | else | ||
11907 | presence.CollisionPlane = new Vector4(0, 0, 0, pos.Z - (1.56f/6f)); | ||
11908 | |||
11909 | |||
11910 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock block = | ||
11911 | CreateImprovedTerseBlock(p, false); | ||
11912 | |||
11913 | const float TIME_DILATION = 1.0f; | ||
11914 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); | ||
11915 | |||
11916 | |||
11917 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); | ||
11918 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
11919 | packet.RegionData.TimeDilation = timeDilation; | ||
11920 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | ||
11921 | |||
11922 | packet.ObjectData[0] = block; | ||
11923 | |||
11924 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
11925 | } | ||
11926 | |||
11927 | //ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | ||
11928 | // AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); | ||
11929 | |||
11930 | } | ||
11876 | } | 11931 | } |
11877 | } | 11932 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 60d1720..b4f1ed6 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -219,40 +219,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
219 | CreateFoldersForPath(destFolder, archivePathSectionToCreate, resolvedFolders, loadedNodes); | 219 | CreateFoldersForPath(destFolder, archivePathSectionToCreate, resolvedFolders, loadedNodes); |
220 | 220 | ||
221 | return destFolder; | 221 | return destFolder; |
222 | |||
223 | /* | ||
224 | string[] rawFolders = filePath.Split(new char[] { '/' }); | ||
225 | |||
226 | // Find the folders that do exist along the path given | ||
227 | int i = 0; | ||
228 | bool noFolder = false; | ||
229 | InventoryFolderImpl foundFolder = rootDestinationFolder; | ||
230 | while (!noFolder && i < rawFolders.Length) | ||
231 | { | ||
232 | InventoryFolderImpl folder = foundFolder.FindFolderByPath(rawFolders[i]); | ||
233 | if (null != folder) | ||
234 | { | ||
235 | m_log.DebugFormat("[INVENTORY ARCHIVER]: Found folder {0}", folder.Name); | ||
236 | foundFolder = folder; | ||
237 | i++; | ||
238 | } | ||
239 | else | ||
240 | { | ||
241 | noFolder = true; | ||
242 | } | ||
243 | } | ||
244 | |||
245 | // Create any folders that did not previously exist | ||
246 | while (i < rawFolders.Length) | ||
247 | { | ||
248 | m_log.DebugFormat("[INVENTORY ARCHIVER]: Creating folder {0}", rawFolders[i]); | ||
249 | |||
250 | UUID newFolderId = UUID.Random(); | ||
251 | m_userInfo.CreateFolder( | ||
252 | rawFolders[i++], newFolderId, (ushort)AssetType.Folder, foundFolder.ID); | ||
253 | foundFolder = foundFolder.GetChildFolder(newFolderId); | ||
254 | } | ||
255 | */ | ||
256 | } | 222 | } |
257 | 223 | ||
258 | /// <summary> | 224 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index 59cd386..00bd27a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
279 | public void TestIarV0_1WithEscapedChars() | 279 | public void TestIarV0_1WithEscapedChars() |
280 | { | 280 | { |
281 | TestHelper.InMethod(); | 281 | TestHelper.InMethod(); |
282 | log4net.Config.XmlConfigurator.Configure(); | 282 | // log4net.Config.XmlConfigurator.Configure(); |
283 | 283 | ||
284 | string itemName = "You & you are a mean/man/"; | 284 | string itemName = "You & you are a mean/man/"; |
285 | string humanEscapedItemName = @"You & you are a mean\/man\/"; | 285 | string humanEscapedItemName = @"You & you are a mean\/man\/"; |
@@ -505,7 +505,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
505 | /// Test replication of an archive path to the user's inventory. | 505 | /// Test replication of an archive path to the user's inventory. |
506 | /// </summary> | 506 | /// </summary> |
507 | [Test] | 507 | [Test] |
508 | public void TestReplicateArchivePathToUserInventory() | 508 | public void TestNewIarPath() |
509 | { | 509 | { |
510 | TestHelper.InMethod(); | 510 | TestHelper.InMethod(); |
511 | //log4net.Config.XmlConfigurator.Configure(); | 511 | //log4net.Config.XmlConfigurator.Configure(); |
@@ -540,5 +540,51 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
540 | InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b"); | 540 | InventoryFolderBase folder2 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, "b"); |
541 | Assert.That(folder2, Is.Not.Null, "Could not find folder b"); | 541 | Assert.That(folder2, Is.Not.Null, "Could not find folder b"); |
542 | } | 542 | } |
543 | |||
544 | /// <summary> | ||
545 | /// Test replication of a partly existing archive path to the user's inventory. | ||
546 | /// </summary> | ||
547 | [Test] | ||
548 | public void TestPartExistingIarPath() | ||
549 | { | ||
550 | TestHelper.InMethod(); | ||
551 | //log4net.Config.XmlConfigurator.Configure(); | ||
552 | |||
553 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | ||
554 | UserAccount ua1 = UserProfileTestUtils.CreateUserWithInventory(scene); | ||
555 | |||
556 | string folder1ExistingName = "a"; | ||
557 | string folder2Name = "b"; | ||
558 | string itemName = "c.lsl"; | ||
559 | |||
560 | InventoryFolderBase folder1 | ||
561 | = UserInventoryTestUtils.CreateInventoryFolder( | ||
562 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); | ||
563 | |||
564 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); | ||
565 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); | ||
566 | string itemArchiveName = InventoryArchiveWriteRequest.CreateArchiveItemName(itemName, UUID.Random()); | ||
567 | |||
568 | string itemArchivePath | ||
569 | = string.Format( | ||
570 | "{0}{1}{2}{3}", | ||
571 | ArchiveConstants.INVENTORY_PATH, folder1ArchiveName, folder2ArchiveName, itemArchiveName); | ||
572 | |||
573 | new InventoryArchiveReadRequest(scene, ua1, null, (Stream)null) | ||
574 | .ReplicateArchivePathToUserInventory( | ||
575 | itemArchivePath, scene.InventoryService.GetRootFolder(ua1.PrincipalID), | ||
576 | new Dictionary<string, InventoryFolderBase>(), new List<InventoryNodeBase>()); | ||
577 | |||
578 | InventoryFolderBase folder1Post | ||
579 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1ExistingName); | ||
580 | Assert.That(folder1Post.ID, Is.EqualTo(folder1.ID)); | ||
581 | /* | ||
582 | InventoryFolderBase folder2 | ||
583 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); | ||
584 | Assert.That(folder2, Is.Not.Null); | ||
585 | InventoryItemBase item = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, folder2, itemName); | ||
586 | Assert.That(item, Is.Not.Null); | ||
587 | */ | ||
588 | } | ||
543 | } | 589 | } |
544 | } \ No newline at end of file | 590 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index c333812..2f1e9dd 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -154,17 +154,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
154 | private void OnInstantMessage(IClientAPI client, GridInstantMessage im) | 154 | private void OnInstantMessage(IClientAPI client, GridInstantMessage im) |
155 | { | 155 | { |
156 | m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog); | 156 | m_log.InfoFormat("[INVENTORY TRANSFER]: OnInstantMessage {0}", im.dialog); |
157 | |||
157 | Scene scene = FindClientScene(client.AgentId); | 158 | Scene scene = FindClientScene(client.AgentId); |
158 | 159 | ||
159 | if (scene == null) // Something seriously wrong here. | 160 | if (scene == null) // Something seriously wrong here. |
160 | return; | 161 | return; |
161 | 162 | ||
162 | 163 | ||
163 | |||
164 | if (im.dialog == (byte) InstantMessageDialog.InventoryOffered) | 164 | if (im.dialog == (byte) InstantMessageDialog.InventoryOffered) |
165 | { | 165 | { |
166 | //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0])); | 166 | //m_log.DebugFormat("Asset type {0}", ((AssetType)im.binaryBucket[0])); |
167 | 167 | ||
168 | if (im.binaryBucket.Length < 17) // Invalid | ||
169 | return; | ||
170 | |||
168 | UUID receipientID = new UUID(im.toAgentID); | 171 | UUID receipientID = new UUID(im.toAgentID); |
169 | ScenePresence user = scene.GetScenePresence(receipientID); | 172 | ScenePresence user = scene.GetScenePresence(receipientID); |
170 | UUID copyID; | 173 | UUID copyID; |
@@ -420,8 +423,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
420 | { | 423 | { |
421 | // Check if this is ours to handle | 424 | // Check if this is ours to handle |
422 | // | 425 | // |
423 | m_log.Info("OnGridInstantMessage"); | ||
424 | |||
425 | Scene scene = FindClientScene(new UUID(msg.toAgentID)); | 426 | Scene scene = FindClientScene(new UUID(msg.toAgentID)); |
426 | 427 | ||
427 | if (scene == null) | 428 | if (scene == null) |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 266621f..5e2c04c 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -180,6 +180,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
180 | 180 | ||
181 | sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); | 181 | sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); |
182 | sp.Teleport(position); | 182 | sp.Teleport(position); |
183 | |||
184 | foreach (SceneObjectGroup grp in sp.Attachments) | ||
185 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); | ||
183 | } | 186 | } |
184 | else // Another region possibly in another simulator | 187 | else // Another region possibly in another simulator |
185 | { | 188 | { |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index b71b5f6..b96d95a 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs | |||
@@ -70,10 +70,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
70 | 70 | ||
71 | #region IMapImageGenerator Members | 71 | #region IMapImageGenerator Members |
72 | 72 | ||
73 | public byte[] WriteJpeg2000Image(string gradientmap) | 73 | public Bitmap CreateMapTile(string gradientmap) |
74 | { | 74 | { |
75 | byte[] imageData = null; | ||
76 | |||
77 | bool drawPrimVolume = true; | 75 | bool drawPrimVolume = true; |
78 | bool textureTerrain = false; | 76 | bool textureTerrain = false; |
79 | 77 | ||
@@ -98,32 +96,36 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
98 | } | 96 | } |
99 | terrainRenderer.Initialise(m_scene, m_config); | 97 | terrainRenderer.Initialise(m_scene, m_config); |
100 | 98 | ||
101 | using (Bitmap mapbmp = new Bitmap((int)Constants.RegionSize, (int)Constants.RegionSize)) | 99 | Bitmap mapbmp = new Bitmap((int)Constants.RegionSize, (int)Constants.RegionSize, System.Drawing.Imaging.PixelFormat.Format24bppRgb); |
102 | { | 100 | //long t = System.Environment.TickCount; |
103 | //long t = System.Environment.TickCount; | 101 | //for (int i = 0; i < 10; ++i) { |
104 | //for (int i = 0; i < 10; ++i) { | 102 | terrainRenderer.TerrainToBitmap(mapbmp); |
105 | terrainRenderer.TerrainToBitmap(mapbmp); | 103 | //} |
106 | //} | 104 | //t = System.Environment.TickCount - t; |
107 | //t = System.Environment.TickCount - t; | 105 | //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); |
108 | //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); | ||
109 | 106 | ||
110 | 107 | ||
111 | if (drawPrimVolume) | 108 | if (drawPrimVolume) |
112 | { | 109 | { |
113 | DrawObjectVolume(m_scene, mapbmp); | 110 | DrawObjectVolume(m_scene, mapbmp); |
114 | } | 111 | } |
115 | 112 | ||
116 | try | 113 | return mapbmp; |
117 | { | 114 | } |
118 | imageData = OpenJPEG.EncodeFromImage(mapbmp, true); | 115 | |
119 | } | 116 | public byte[] WriteJpeg2000Image(string gradientmap) |
120 | catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke | 117 | { |
121 | { | 118 | try |
122 | m_log.Error("Failed generating terrain map: " + e); | 119 | { |
123 | } | 120 | using (Bitmap mapbmp = CreateMapTile(gradientmap)) |
121 | return OpenJPEG.EncodeFromImage(mapbmp, true); | ||
122 | } | ||
123 | catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke | ||
124 | { | ||
125 | m_log.Error("Failed generating terrain map: " + e); | ||
124 | } | 126 | } |
125 | 127 | ||
126 | return imageData; | 128 | return null; |
127 | } | 129 | } |
128 | 130 | ||
129 | #endregion | 131 | #endregion |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs index a297cf3..fef2ef3 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
37 | { | 37 | { |
38 | public class ShadedMapTileRenderer : IMapTileTerrainRenderer | 38 | public class ShadedMapTileRenderer : IMapTileTerrainRenderer |
39 | { | 39 | { |
40 | private static readonly Color WATER_COLOR = Color.FromArgb(29, 71, 95); | ||
41 | |||
40 | private static readonly ILog m_log = | 42 | private static readonly ILog m_log = |
41 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
42 | 44 | ||
@@ -221,8 +223,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
221 | 223 | ||
222 | try | 224 | try |
223 | { | 225 | { |
224 | Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255); | 226 | mapbmp.SetPixel(x, yr, WATER_COLOR); |
225 | mapbmp.SetPixel(x, yr, water); | ||
226 | } | 227 | } |
227 | catch (ArgumentException) | 228 | catch (ArgumentException) |
228 | { | 229 | { |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs index 4ecad74..8b34f6e 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs | |||
@@ -136,6 +136,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
136 | private static readonly UUID defaultTerrainTexture4 = new UUID("53a2f406-4895-1d13-d541-d2e3b86bc19c"); | 136 | private static readonly UUID defaultTerrainTexture4 = new UUID("53a2f406-4895-1d13-d541-d2e3b86bc19c"); |
137 | private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200); | 137 | private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200); |
138 | 138 | ||
139 | private static readonly Color WATER_COLOR = Color.FromArgb(29, 71, 95); | ||
140 | |||
139 | #endregion | 141 | #endregion |
140 | 142 | ||
141 | 143 | ||
@@ -406,8 +408,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
406 | 408 | ||
407 | heightvalue = 100f - (heightvalue * 100f) / 19f; // 0 - 19 => 100 - 0 | 409 | heightvalue = 100f - (heightvalue * 100f) / 19f; // 0 - 19 => 100 - 0 |
408 | 410 | ||
409 | Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255); | 411 | mapbmp.SetPixel(x, yr, WATER_COLOR); |
410 | mapbmp.SetPixel(x, yr, water); | ||
411 | } | 412 | } |
412 | } | 413 | } |
413 | } | 414 | } |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index c6fb18d..0e849e5 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -1002,41 +1002,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1002 | 1002 | ||
1003 | public void RegenerateMaptile(byte[] data) | 1003 | public void RegenerateMaptile(byte[] data) |
1004 | { | 1004 | { |
1005 | // Overwrites the local Asset cache with new maptile data | ||
1006 | // Assets are single write, this causes the asset server to ignore this update, | ||
1007 | // but the local asset cache does not | ||
1008 | |||
1009 | // this is on purpose! The net result of this is the region always has the most up to date | ||
1010 | // map tile while protecting the (grid) asset database from bloat caused by a new asset each | ||
1011 | // time a mapimage is generated! | ||
1012 | |||
1013 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; | 1005 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; |
1014 | 1006 | ||
1015 | int lastMapRefresh = 0; | ||
1016 | int twoDays = 172800; | ||
1017 | // int RefreshSeconds = twoDays; | ||
1018 | |||
1019 | try | ||
1020 | { | ||
1021 | lastMapRefresh = Convert.ToInt32(m_scene.RegionInfo.lastMapRefresh); | ||
1022 | } | ||
1023 | catch (ArgumentException) | ||
1024 | { | ||
1025 | } | ||
1026 | catch (FormatException) | ||
1027 | { | ||
1028 | } | ||
1029 | catch (OverflowException) | ||
1030 | { | ||
1031 | } | ||
1032 | |||
1033 | m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE"); | 1007 | m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE"); |
1034 | 1008 | ||
1035 | m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); | 1009 | m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); |
1036 | 1010 | ||
1037 | AssetBase asset = new AssetBase( | 1011 | AssetBase asset = new AssetBase( |
1038 | m_scene.RegionInfo.RegionSettings.TerrainImageID, | 1012 | m_scene.RegionInfo.RegionSettings.TerrainImageID, |
1039 | "terrainImage_" + m_scene.RegionInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(), | 1013 | "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(), |
1040 | (sbyte)AssetType.Texture, | 1014 | (sbyte)AssetType.Texture, |
1041 | m_scene.RegionInfo.RegionID.ToString()); | 1015 | m_scene.RegionInfo.RegionID.ToString()); |
1042 | asset.Data = data; | 1016 | asset.Data = data; |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index a84a3c8..8ec5bb5 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -1164,5 +1164,9 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
1164 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1164 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1165 | { | 1165 | { |
1166 | } | 1166 | } |
1167 | |||
1168 | public void StopFlying(ISceneEntity presence) | ||
1169 | { | ||
1170 | } | ||
1167 | } | 1171 | } |
1168 | } | 1172 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrain.cs b/OpenSim/Region/Framework/Interfaces/ITerrain.cs index f5662cb..b42e872 100644 --- a/OpenSim/Region/Framework/Interfaces/ITerrain.cs +++ b/OpenSim/Region/Framework/Interfaces/ITerrain.cs | |||
@@ -73,6 +73,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
73 | 73 | ||
74 | public interface IMapImageGenerator | 74 | public interface IMapImageGenerator |
75 | { | 75 | { |
76 | System.Drawing.Bitmap CreateMapTile(string gradientmap); | ||
76 | byte[] WriteJpeg2000Image(string gradientmap); | 77 | byte[] WriteJpeg2000Image(string gradientmap); |
77 | } | 78 | } |
78 | } | 79 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index c4cff12..c3cdca8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -681,7 +681,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
681 | foreach (TaskInventoryItem item in items) | 681 | foreach (TaskInventoryItem item in items) |
682 | { | 682 | { |
683 | m_items.Add(item.ItemID, item); | 683 | m_items.Add(item.ItemID, item); |
684 | m_part.TriggerScriptChangedEvent(Changed.INVENTORY); | 684 | // m_part.TriggerScriptChangedEvent(Changed.INVENTORY); |
685 | } | 685 | } |
686 | m_items.LockItemsForWrite(false); | 686 | m_items.LockItemsForWrite(false); |
687 | 687 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8cd3ac6..b6f67f7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1098,27 +1098,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1098 | 1098 | ||
1099 | public void StopFlying() | 1099 | public void StopFlying() |
1100 | { | 1100 | { |
1101 | // It turns out to get the agent to stop flying, you have to feed it stop flying velocities | 1101 | ControllingClient.StopFlying(this); |
1102 | // There's no explicit message to send the client to tell it to stop flying.. it relies on the | ||
1103 | // velocity, collision plane and avatar height | ||
1104 | |||
1105 | // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air | ||
1106 | // when the avatar stands up | ||
1107 | |||
1108 | if (m_avHeight != 127.0f) | ||
1109 | { | ||
1110 | AbsolutePosition = AbsolutePosition + new Vector3(0f, 0f, (m_avHeight / 6f)); | ||
1111 | } | ||
1112 | else | ||
1113 | { | ||
1114 | AbsolutePosition = AbsolutePosition + new Vector3(0f, 0f, (1.56f / 6f)); | ||
1115 | } | ||
1116 | |||
1117 | m_updateCount = UPDATE_COUNT; //KF: Trigger Anim updates to catch falling anim. | ||
1118 | |||
1119 | ControllingClient.SendPrimUpdate(this, PrimUpdateFlags.Position); | ||
1120 | //ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | ||
1121 | // AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); | ||
1122 | } | 1102 | } |
1123 | 1103 | ||
1124 | public void AddNeighbourRegion(ulong regionHandle, string cap) | 1104 | public void AddNeighbourRegion(ulong regionHandle, string cap) |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index f7544ac..5bdaa17 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -221,7 +221,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
221 | sr = new StringReader(parts[i].OuterXml); | 221 | sr = new StringReader(parts[i].OuterXml); |
222 | reader = new XmlTextReader(sr); | 222 | reader = new XmlTextReader(sr); |
223 | SceneObjectPart part = SceneObjectPart.FromXml(reader); | 223 | SceneObjectPart part = SceneObjectPart.FromXml(reader); |
224 | |||
225 | int originalLinkNum = part.LinkNum; | ||
226 | |||
224 | sceneObject.AddPart(part); | 227 | sceneObject.AddPart(part); |
228 | |||
229 | // SceneObjectGroup.AddPart() tries to be smart and automatically set the LinkNum. | ||
230 | // We override that here | ||
231 | if (originalLinkNum != 0) | ||
232 | part.LinkNum = originalLinkNum; | ||
233 | |||
225 | part.StoreUndoState(); | 234 | part.StoreUndoState(); |
226 | reader.Close(); | 235 | reader.Close(); |
227 | sr.Close(); | 236 | sr.Close(); |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 2ed8fbf..d72ee6f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1689,5 +1689,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1689 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1689 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1690 | { | 1690 | { |
1691 | } | 1691 | } |
1692 | |||
1693 | public void StopFlying(ISceneEntity presence) | ||
1694 | { | ||
1695 | } | ||
1692 | } | 1696 | } |
1693 | } | 1697 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index e43ef78..c3edba2 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -1171,5 +1171,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1171 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1171 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1172 | { | 1172 | { |
1173 | } | 1173 | } |
1174 | |||
1175 | public void StopFlying(ISceneEntity presence) | ||
1176 | { | ||
1177 | } | ||
1174 | } | 1178 | } |
1175 | } | 1179 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0a4544c..9f3e354 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2862,6 +2862,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2862 | // objects rezzed with this method are die_at_edge by default. | 2862 | // objects rezzed with this method are die_at_edge by default. |
2863 | new_group.RootPart.SetDieAtEdge(true); | 2863 | new_group.RootPart.SetDieAtEdge(true); |
2864 | 2864 | ||
2865 | new_group.ResumeScripts(); | ||
2866 | |||
2865 | m_ScriptEngine.PostObjectEvent(m_host.LocalId, new EventParams( | 2867 | m_ScriptEngine.PostObjectEvent(m_host.LocalId, new EventParams( |
2866 | "object_rez", new Object[] { | 2868 | "object_rez", new Object[] { |
2867 | new LSL_String( | 2869 | new LSL_String( |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp index 23138ef..f02d2d9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OpenSim.Region.ScriptEngine.Shared.Api.Runtime.mdp | |||
@@ -18,10 +18,10 @@ | |||
18 | </DeploymentInformation> | 18 | </DeploymentInformation> |
19 | <Contents> | 19 | <Contents> |
20 | <File name="./CM_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 20 | <File name="./CM_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
21 | <File name="./CM_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | ||
22 | <File name="./Executor.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 21 | <File name="./Executor.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
23 | <File name="./LSL_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 22 | <File name="./LSL_Constants.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
24 | <File name="./LSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 23 | <File name="./LSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
24 | <File name="./LS_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | ||
25 | <File name="./MOD_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 25 | <File name="./MOD_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
26 | <File name="./OSSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 26 | <File name="./OSSL_Stub.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
27 | <File name="./ScriptBase.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> | 27 | <File name="./ScriptBase.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |