diff options
author | Jeff Ames | 2008-06-18 03:50:39 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-18 03:50:39 +0000 |
commit | a728417eda4a2cb2d8e301de9ccb7d0d4d8be8b2 (patch) | |
tree | 09057d5714526ab3df816432673bbef9a4da6f05 /OpenSim | |
parent | make neb happy. I found where we initialized the dynamic textures to (diff) | |
download | opensim-SC-a728417eda4a2cb2d8e301de9ccb7d0d4d8be8b2.zip opensim-SC-a728417eda4a2cb2d8e301de9ccb7d0d4d8be8b2.tar.gz opensim-SC-a728417eda4a2cb2d8e301de9ccb7d0d4d8be8b2.tar.bz2 opensim-SC-a728417eda4a2cb2d8e301de9ccb7d0d4d8be8b2.tar.xz |
Minor formatting cleanup.
Diffstat (limited to 'OpenSim')
5 files changed, 55 insertions, 72 deletions
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 62ff095..62177a6 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -183,7 +183,7 @@ namespace OpenSim.Framework.Servers | |||
183 | switch (ShowWhat) | 183 | switch (ShowWhat) |
184 | { | 184 | { |
185 | case "info": | 185 | case "info": |
186 | Notice("Version: " + m_version ); | 186 | Notice("Version: " + m_version); |
187 | Notice("Startup directory: " + m_startupDirectory); | 187 | Notice("Startup directory: " + m_startupDirectory); |
188 | break; | 188 | break; |
189 | 189 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs index 3d7273e..199539b 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
37 | /// Method called when all the necessary assets for an archive request have been received. | 37 | /// Method called when all the necessary assets for an archive request have been received. |
38 | /// </summary> | 38 | /// </summary> |
39 | public delegate void AssetsRequestCallback(IDictionary<LLUUID, AssetBase> assets); | 39 | public delegate void AssetsRequestCallback(IDictionary<LLUUID, AssetBase> assets); |
40 | 40 | ||
41 | /// <summary> | 41 | /// <summary> |
42 | /// Execute the write of an archive once we have received all the necessary data | 42 | /// Execute the write of an archive once we have received all the necessary data |
43 | /// </summary> | 43 | /// </summary> |
@@ -46,14 +46,14 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | protected string m_savePath; | 48 | protected string m_savePath; |
49 | protected string m_serializedEntities; | 49 | protected string m_serializedEntities; |
50 | 50 | ||
51 | public ArchiveWriteRequestExecution(string serializedEntities, string savePath) | 51 | public ArchiveWriteRequestExecution(string serializedEntities, string savePath) |
52 | { | 52 | { |
53 | m_serializedEntities = serializedEntities; | 53 | m_serializedEntities = serializedEntities; |
54 | m_savePath = savePath; | 54 | m_savePath = savePath; |
55 | } | 55 | } |
56 | 56 | ||
57 | protected internal void ReceivedAllAssets(IDictionary<LLUUID, AssetBase> assets) | 57 | protected internal void ReceivedAllAssets(IDictionary<LLUUID, AssetBase> assets) |
58 | { | 58 | { |
59 | m_log.DebugFormat("[ARCHIVER]: Received all {0} assets required", assets.Count); | 59 | m_log.DebugFormat("[ARCHIVER]: Received all {0} assets required", assets.Count); |
@@ -61,13 +61,13 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
61 | TarArchiveWriter archive = new TarArchiveWriter(); | 61 | TarArchiveWriter archive = new TarArchiveWriter(); |
62 | 62 | ||
63 | archive.AddFile(ArchiveConstants.PRIMS_PATH, m_serializedEntities); | 63 | archive.AddFile(ArchiveConstants.PRIMS_PATH, m_serializedEntities); |
64 | 64 | ||
65 | AssetsArchiver assetsArchiver = new AssetsArchiver(assets); | 65 | AssetsArchiver assetsArchiver = new AssetsArchiver(assets); |
66 | assetsArchiver.Archive(archive); | 66 | assetsArchiver.Archive(archive); |
67 | 67 | ||
68 | archive.WriteTar(m_savePath); | 68 | archive.WriteTar(m_savePath); |
69 | 69 | ||
70 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive {0}", m_savePath); | 70 | m_log.InfoFormat("[ARCHIVER]: Wrote out OpenSimulator archive {0}", m_savePath); |
71 | } | 71 | } |
72 | } | 72 | } |
73 | } | 73 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs index 5ff435c..a0c6dbf 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -47,14 +47,14 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | protected Scene m_scene; | 49 | protected Scene m_scene; |
50 | protected string m_savePath; | 50 | protected string m_savePath; |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate | 53 | /// Used as a temporary store of an asset which represents an object. This can be a null if no appropriate |
54 | /// asset was found by the asset service. | 54 | /// asset was found by the asset service. |
55 | /// </summary> | 55 | /// </summary> |
56 | protected AssetBase m_requestedObjectAsset; | 56 | protected AssetBase m_requestedObjectAsset; |
57 | 57 | ||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Signal whether we are currently waiting for the asset service to deliver an asset. | 59 | /// Signal whether we are currently waiting for the asset service to deliver an asset. |
60 | /// </summary> | 60 | /// </summary> |
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
68 | m_scene = scene; | 68 | m_scene = scene; |
69 | m_savePath = savePath; | 69 | m_savePath = savePath; |
70 | } | 70 | } |
71 | 71 | ||
72 | /// <summary> | 72 | /// <summary> |
73 | /// The callback made when we request the asset for an object from the asset service. | 73 | /// The callback made when we request the asset for an object from the asset service. |
74 | /// </summary> | 74 | /// </summary> |
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
81 | Monitor.Pulse(this); | 81 | Monitor.Pulse(this); |
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | /// <summary> | 85 | /// <summary> |
86 | /// Get all the asset uuids associated with a given object. This includes both those directly associated with | 86 | /// Get all the asset uuids associated with a given object. This includes both those directly associated with |
87 | /// it (e.g. face textures) and recursively, those of items within it's inventory (e.g. objects contained | 87 | /// it (e.g. face textures) and recursively, those of items within it's inventory (e.g. objects contained |
@@ -93,17 +93,17 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
93 | { | 93 | { |
94 | m_log.DebugFormat( | 94 | m_log.DebugFormat( |
95 | "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.RootPart.Name, sceneObject.UUID); | 95 | "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.RootPart.Name, sceneObject.UUID); |
96 | 96 | ||
97 | foreach (SceneObjectPart part in sceneObject.GetParts()) | 97 | foreach (SceneObjectPart part in sceneObject.GetParts()) |
98 | { | 98 | { |
99 | m_log.DebugFormat( | 99 | m_log.DebugFormat( |
100 | "[ARCHIVER]: Getting part {0}, {1} for object {2}", part.Name, part.UUID, sceneObject.UUID); | 100 | "[ARCHIVER]: Getting part {0}, {1} for object {2}", part.Name, part.UUID, sceneObject.UUID); |
101 | 101 | ||
102 | LLObject.TextureEntry textureEntry = part.Shape.Textures; | 102 | LLObject.TextureEntry textureEntry = part.Shape.Textures; |
103 | 103 | ||
104 | // Get the prim's default texture. This will be used for faces which don't have their own texture | 104 | // Get the prim's default texture. This will be used for faces which don't have their own texture |
105 | assetUuids[textureEntry.DefaultTexture.TextureID] = 1; | 105 | assetUuids[textureEntry.DefaultTexture.TextureID] = 1; |
106 | 106 | ||
107 | // XXX: Not a great way to iterate through face textures, but there's no | 107 | // XXX: Not a great way to iterate through face textures, but there's no |
108 | // other method available to tell how many faces there actually are | 108 | // other method available to tell how many faces there actually are |
109 | int i = 0; | 109 | int i = 0; |
@@ -114,26 +114,26 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
114 | m_log.DebugFormat("[ARCHIVER]: Got face {0}", i++); | 114 | m_log.DebugFormat("[ARCHIVER]: Got face {0}", i++); |
115 | assetUuids[texture.TextureID] = 1; | 115 | assetUuids[texture.TextureID] = 1; |
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | foreach (TaskInventoryItem tii in part.TaskInventory.Values) | 119 | foreach (TaskInventoryItem tii in part.TaskInventory.Values) |
120 | { | 120 | { |
121 | if (!assetUuids.ContainsKey(tii.AssetID)) | 121 | if (!assetUuids.ContainsKey(tii.AssetID)) |
122 | { | 122 | { |
123 | assetUuids[tii.AssetID] = 1; | 123 | assetUuids[tii.AssetID] = 1; |
124 | 124 | ||
125 | if (tii.Type != (int)InventoryType.Object) | 125 | if (tii.Type != (int)InventoryType.Object) |
126 | { | 126 | { |
127 | m_log.DebugFormat("[ARCHIVER]: Recording asset {0} in object {1}", tii.AssetID, part.UUID); | 127 | m_log.DebugFormat("[ARCHIVER]: Recording asset {0} in object {1}", tii.AssetID, part.UUID); |
128 | } | 128 | } |
129 | else | 129 | else |
130 | { | 130 | { |
131 | m_waitingForObjectAsset = true; | 131 | m_waitingForObjectAsset = true; |
132 | m_scene.AssetCache.GetAsset(tii.AssetID, AssetRequestCallback, true); | 132 | m_scene.AssetCache.GetAsset(tii.AssetID, AssetRequestCallback, true); |
133 | 133 | ||
134 | // The asset cache callback can either | 134 | // The asset cache callback can either |
135 | // | 135 | // |
136 | // 1. Complete on the same thread (if the asset is already in the cache) or | 136 | // 1. Complete on the same thread (if the asset is already in the cache) or |
137 | // 2. Come in via a different thread (if we need to go fetch it). | 137 | // 2. Come in via a different thread (if we need to go fetch it). |
138 | // | 138 | // |
139 | // The code below handles both these alternatives. | 139 | // The code below handles both these alternatives. |
@@ -141,11 +141,11 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
141 | { | 141 | { |
142 | if (m_waitingForObjectAsset) | 142 | if (m_waitingForObjectAsset) |
143 | { | 143 | { |
144 | Monitor.Wait(this); | 144 | Monitor.Wait(this); |
145 | m_waitingForObjectAsset = false; | 145 | m_waitingForObjectAsset = false; |
146 | } | 146 | } |
147 | } | 147 | } |
148 | 148 | ||
149 | if (null != m_requestedObjectAsset) | 149 | if (null != m_requestedObjectAsset) |
150 | { | 150 | { |
151 | string xml = Helpers.FieldToUTF8String(m_requestedObjectAsset.Data); | 151 | string xml = Helpers.FieldToUTF8String(m_requestedObjectAsset.Data); |
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
156 | } | 156 | } |
157 | } | 157 | } |
158 | } | 158 | } |
159 | } | 159 | } |
160 | 160 | ||
161 | public void ArchiveRegion() | 161 | public void ArchiveRegion() |
162 | { | 162 | { |
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
180 | m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} assets", assetUuids.Count); | 180 | m_log.DebugFormat("[ARCHIVER]: Requiring save of {0} assets", assetUuids.Count); |
181 | 181 | ||
182 | // Asynchronously request all the assets required to perform this archive operation | 182 | // Asynchronously request all the assets required to perform this archive operation |
183 | ArchiveWriteRequestExecution awre = new ArchiveWriteRequestExecution(serializedEntities, m_savePath); | 183 | ArchiveWriteRequestExecution awre = new ArchiveWriteRequestExecution(serializedEntities, m_savePath); |
184 | new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute(); | 184 | new AssetsRequest(assetUuids.Keys, m_scene.AssetCache, awre.ReceivedAllAssets).Execute(); |
185 | } | 185 | } |
186 | } | 186 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7adfeca..04ce8d4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -79,12 +79,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
79 | private int m_timePhase = 24; | 79 | private int m_timePhase = 24; |
80 | 80 | ||
81 | private readonly Mutex updateLock; | 81 | private readonly Mutex updateLock; |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Are we applying physics to any of the prims in this scene? | 84 | /// Are we applying physics to any of the prims in this scene? |
85 | /// </summary> | 85 | /// </summary> |
86 | public bool m_physicalPrim; | 86 | public bool m_physicalPrim; |
87 | 87 | ||
88 | public bool m_seeIntoRegionFromNeighbor; | 88 | public bool m_seeIntoRegionFromNeighbor; |
89 | public int MaxUndoCount = 5; | 89 | public int MaxUndoCount = 5; |
90 | private int m_RestartTimerCounter; | 90 | private int m_RestartTimerCounter; |
@@ -410,7 +410,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
410 | if (!CheckNeighborRegion(region)) | 410 | if (!CheckNeighborRegion(region)) |
411 | { | 411 | { |
412 | m_neighbours.Add(region); | 412 | m_neighbours.Add(region); |
413 | |||
414 | } | 413 | } |
415 | } | 414 | } |
416 | } | 415 | } |
@@ -430,9 +429,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
430 | } | 429 | } |
431 | } | 430 | } |
432 | return found; | 431 | return found; |
433 | |||
434 | |||
435 | } | 432 | } |
433 | |||
436 | public virtual void Restart(float seconds) | 434 | public virtual void Restart(float seconds) |
437 | { | 435 | { |
438 | // notifications are done in 15 second increments | 436 | // notifications are done in 15 second increments |
@@ -779,17 +777,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
779 | catch (AccessViolationException e) | 777 | catch (AccessViolationException e) |
780 | { | 778 | { |
781 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 779 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
782 | |||
783 | } | 780 | } |
784 | catch (NullReferenceException e) | 781 | catch (NullReferenceException e) |
785 | { | 782 | { |
786 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 783 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
787 | |||
788 | } | 784 | } |
789 | catch (InvalidOperationException e) | 785 | catch (InvalidOperationException e) |
790 | { | 786 | { |
791 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); | 787 | m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); |
792 | |||
793 | } | 788 | } |
794 | catch (Exception e) | 789 | catch (Exception e) |
795 | { | 790 | { |
@@ -873,7 +868,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
873 | /// <returns></returns> | 868 | /// <returns></returns> |
874 | public void Backup() | 869 | public void Backup() |
875 | { | 870 | { |
876 | EventManager.TriggerOnBackup(m_storageManager.DataStore); | 871 | EventManager.TriggerOnBackup(m_storageManager.DataStore); |
877 | m_backingup = false; | 872 | m_backingup = false; |
878 | //return true; | 873 | //return true; |
879 | } | 874 | } |
@@ -1188,12 +1183,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1188 | continue; | 1183 | continue; |
1189 | 1184 | ||
1190 | LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; | 1185 | LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; |
1191 | |||
1192 | // Not sure why some of these are null, oh well. | ||
1193 | |||
1194 | |||
1195 | |||
1196 | 1186 | ||
1187 | // Not sure why some of these are null, oh well. | ||
1197 | 1188 | ||
1198 | int colorr = 255 - (int)(texcolor.R * 255f); | 1189 | int colorr = 255 - (int)(texcolor.R * 255f); |
1199 | int colorg = 255 - (int)(texcolor.G * 255f); | 1190 | int colorg = 255 - (int)(texcolor.G * 255f); |
@@ -1314,8 +1305,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
1314 | return; | 1305 | return; |
1315 | } | 1306 | } |
1316 | 1307 | ||
1317 | |||
1318 | |||
1319 | LLUUID lastMapRegionUUID = m_regInfo.lastMapUUID; | 1308 | LLUUID lastMapRegionUUID = m_regInfo.lastMapUUID; |
1320 | 1309 | ||
1321 | int lastMapRefresh = 0; | 1310 | int lastMapRefresh = 0; |
@@ -1325,23 +1314,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
1325 | try | 1314 | try |
1326 | { | 1315 | { |
1327 | lastMapRefresh = Convert.ToInt32(m_regInfo.lastMapRefresh); | 1316 | lastMapRefresh = Convert.ToInt32(m_regInfo.lastMapRefresh); |
1328 | } catch (ArgumentException) | 1317 | } |
1329 | {} | 1318 | catch (ArgumentException) |
1319 | { | ||
1320 | } | ||
1330 | catch (FormatException) | 1321 | catch (FormatException) |
1331 | {} | 1322 | { |
1323 | } | ||
1332 | catch (OverflowException) | 1324 | catch (OverflowException) |
1333 | {} | 1325 | { |
1326 | } | ||
1334 | 1327 | ||
1335 | LLUUID TerrainImageLLUUID = LLUUID.Random(); | 1328 | LLUUID TerrainImageLLUUID = LLUUID.Random(); |
1336 | 1329 | ||
1337 | if (lastMapRegionUUID == LLUUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) | 1330 | if (lastMapRegionUUID == LLUUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) |
1338 | { | 1331 | { |
1339 | |||
1340 | m_regInfo.SaveLastMapUUID(TerrainImageLLUUID); | 1332 | m_regInfo.SaveLastMapUUID(TerrainImageLLUUID); |
1341 | 1333 | ||
1342 | m_log.Warn("[MAPTILE]: STORING MAPTILE IMAGE"); | 1334 | m_log.Warn("[MAPTILE]: STORING MAPTILE IMAGE"); |
1343 | //Extra protection.. probably not needed. | 1335 | //Extra protection.. probably not needed. |
1344 | |||
1345 | } | 1336 | } |
1346 | else | 1337 | else |
1347 | { | 1338 | { |
@@ -1349,16 +1340,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1349 | m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID"); | 1340 | m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID"); |
1350 | } | 1341 | } |
1351 | 1342 | ||
1352 | |||
1353 | |||
1354 | m_regInfo.EstateSettings.terrainImageID = TerrainImageLLUUID; | 1343 | m_regInfo.EstateSettings.terrainImageID = TerrainImageLLUUID; |
1355 | 1344 | ||
1356 | AssetBase asset = new AssetBase(); | 1345 | AssetBase asset = new AssetBase(); |
1357 | asset.FullID = m_regInfo.EstateSettings.terrainImageID; | 1346 | asset.FullID = m_regInfo.EstateSettings.terrainImageID; |
1358 | asset.Data = data; | 1347 | asset.Data = data; |
1359 | asset.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); | 1348 | asset.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); |
1360 | asset.Description = RegionInfo.RegionName; | 1349 | asset.Description = RegionInfo.RegionName; |
1361 | 1350 | ||
1362 | asset.Type = 0; | 1351 | asset.Type = 0; |
1363 | asset.Temporary = temporary; | 1352 | asset.Temporary = temporary; |
1364 | AssetCache.AddAsset(asset); | 1353 | AssetCache.AddAsset(asset); |
@@ -1379,22 +1368,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
1379 | lastMapRefresh = Convert.ToInt32(m_regInfo.lastMapRefresh); | 1368 | lastMapRefresh = Convert.ToInt32(m_regInfo.lastMapRefresh); |
1380 | } | 1369 | } |
1381 | catch (ArgumentException) | 1370 | catch (ArgumentException) |
1382 | { } | 1371 | { |
1372 | } | ||
1383 | catch (FormatException) | 1373 | catch (FormatException) |
1384 | { } | 1374 | { |
1375 | } | ||
1385 | catch (OverflowException) | 1376 | catch (OverflowException) |
1386 | { } | 1377 | { |
1378 | } | ||
1387 | 1379 | ||
1388 | LLUUID TerrainImageLLUUID = LLUUID.Random(); | 1380 | LLUUID TerrainImageLLUUID = LLUUID.Random(); |
1389 | 1381 | ||
1390 | if (lastMapRegionUUID == LLUUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) | 1382 | if (lastMapRegionUUID == LLUUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) |
1391 | { | 1383 | { |
1392 | |||
1393 | m_regInfo.SaveLastMapUUID(TerrainImageLLUUID); | 1384 | m_regInfo.SaveLastMapUUID(TerrainImageLLUUID); |
1394 | 1385 | ||
1395 | //m_log.Warn(terrainImageID); | 1386 | //m_log.Warn(terrainImageID); |
1396 | //Extra protection.. probably not needed. | 1387 | //Extra protection.. probably not needed. |
1397 | |||
1398 | } | 1388 | } |
1399 | else | 1389 | else |
1400 | { | 1390 | { |
@@ -1402,7 +1392,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1402 | } | 1392 | } |
1403 | 1393 | ||
1404 | m_regInfo.EstateSettings.terrainImageID = TerrainImageLLUUID; | 1394 | m_regInfo.EstateSettings.terrainImageID = TerrainImageLLUUID; |
1405 | 1395 | ||
1406 | AssetBase asset = new AssetBase(); | 1396 | AssetBase asset = new AssetBase(); |
1407 | asset.FullID = m_regInfo.EstateSettings.terrainImageID; | 1397 | asset.FullID = m_regInfo.EstateSettings.terrainImageID; |
1408 | asset.Data = data; | 1398 | asset.Data = data; |
@@ -1579,10 +1569,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1579 | { | 1569 | { |
1580 | //m_log.DebugFormat( | 1570 | //m_log.DebugFormat( |
1581 | // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName); | 1571 | // "[SCENE]: Scene.AddNewPrim() called for agent {0} in {1}", ownerID, RegionInfo.RegionName); |
1582 | 1572 | ||
1583 | SceneObjectGroup sceneOb = | 1573 | SceneObjectGroup sceneOb = |
1584 | new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); | 1574 | new SceneObjectGroup(this, m_regionHandle, ownerID, PrimIDAllocate(), pos, rot, shape); |
1585 | 1575 | ||
1586 | SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); | 1576 | SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); |
1587 | // if grass or tree, make phantom | 1577 | // if grass or tree, make phantom |
1588 | //rootPart.TrimPermissions(); | 1578 | //rootPart.TrimPermissions(); |
@@ -2980,9 +2970,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
2980 | { | 2970 | { |
2981 | if (controller.AgentId != godID) | 2971 | if (controller.AgentId != godID) |
2982 | controller.Kick(Helpers.FieldToUTF8String(reason)); | 2972 | controller.Kick(Helpers.FieldToUTF8String(reason)); |
2983 | |||
2984 | |||
2985 | |||
2986 | } | 2973 | } |
2987 | ); | 2974 | ); |
2988 | 2975 | ||
@@ -3261,13 +3248,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
3261 | 3248 | ||
3262 | public void TriggerObjectChanged(uint localID, uint change) | 3249 | public void TriggerObjectChanged(uint localID, uint change) |
3263 | { | 3250 | { |
3264 | |||
3265 | m_eventManager.TriggerOnScriptChangedEvent(localID, change); | 3251 | m_eventManager.TriggerOnScriptChangedEvent(localID, change); |
3266 | } | 3252 | } |
3267 | 3253 | ||
3268 | public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) | 3254 | public void TriggerAtTargetEvent(uint localID, uint handle, LLVector3 targetpos, LLVector3 currentpos) |
3269 | { | 3255 | { |
3270 | |||
3271 | m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos); | 3256 | m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos); |
3272 | } | 3257 | } |
3273 | 3258 | ||
@@ -3331,6 +3316,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3331 | return false; | 3316 | return false; |
3332 | } | 3317 | } |
3333 | } | 3318 | } |
3319 | |||
3334 | public bool scriptDanger(uint localID, LLVector3 pos) | 3320 | public bool scriptDanger(uint localID, LLVector3 pos) |
3335 | { | 3321 | { |
3336 | SceneObjectPart part = GetSceneObjectPart(localID); | 3322 | SceneObjectPart part = GetSceneObjectPart(localID); |
@@ -3351,7 +3337,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
3351 | { | 3337 | { |
3352 | LLVector3 pos = part.GetWorldPosition(); | 3338 | LLVector3 pos = part.GetWorldPosition(); |
3353 | return scriptDanger(part, pos); | 3339 | return scriptDanger(part, pos); |
3354 | |||
3355 | } | 3340 | } |
3356 | else | 3341 | else |
3357 | { | 3342 | { |
@@ -3589,8 +3574,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
3589 | } | 3574 | } |
3590 | return visualParams; | 3575 | return visualParams; |
3591 | } | 3576 | } |
3592 | #endregion | ||
3593 | |||
3594 | 3577 | ||
3578 | #endregion | ||
3595 | } | 3579 | } |
3596 | } | 3580 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index c343973..878cd20 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -765,8 +765,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
765 | return new LSL_Types.Vector3( | 765 | return new LSL_Types.Vector3( |
766 | SensedObject.AbsolutePosition.X, | 766 | SensedObject.AbsolutePosition.X, |
767 | SensedObject.AbsolutePosition.Y, | 767 | SensedObject.AbsolutePosition.Y, |
768 | SensedObject.AbsolutePosition.Y ); | 768 | SensedObject.AbsolutePosition.Y); |
769 | |||
770 | } | 769 | } |
771 | 770 | ||
772 | public LSL_Types.Quaternion llDetectedRot(int number) | 771 | public LSL_Types.Quaternion llDetectedRot(int number) |