From 52952a75ca5c8c095a4a21a9aa885c9f894a9b01 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 24 Nov 2009 15:20:02 +0000 Subject: [PATCH 1/8] minor: remove experimental tags from load iar and save iar commands --- .../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 1228eb11c9..2c0d11357a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -92,12 +92,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver scene.AddCommand( this, "load iar", "load iar []", - "Load user inventory archive. EXPERIMENTAL", HandleLoadInvConsoleCommand); + "Load user inventory archive.", HandleLoadInvConsoleCommand); scene.AddCommand( this, "save iar", "save iar []", - "Save user inventory archive. EXPERIMENTAL", HandleSaveInvConsoleCommand); + "Save user inventory archive.", HandleSaveInvConsoleCommand); m_aScene = scene; } From 88ead9ee63fe87b16d7c24b3a38bf6567f3166f6 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 24 Nov 2009 17:28:38 +0000 Subject: [PATCH 2/8] pass all command parameters to load/save oar, not just the filename unfortunately, these commands cannot yet be properly relocated to the region modules due to deficiencies in the region module infrastructure --- OpenSim/Region/Application/OpenSim.cs | 18 +-------- OpenSim/Region/Application/OpenSimBase.cs | 5 --- .../World/Archiver/ArchiverModule.cs | 37 +++++++++++++++++++ .../Interfaces/IRegionArchiverModule.cs | 5 ++- .../Region/Framework/Scenes/SceneManager.cs | 12 +++--- 5 files changed, 49 insertions(+), 28 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 60c34df8bd..f9be1e24a3 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -1294,14 +1294,7 @@ namespace OpenSim { try { - if (cmdparams.Length > 2) - { - m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]); - } - else - { - m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME); - } + m_sceneManager.LoadArchiveToCurrentScene(cmdparams); } catch (Exception e) { @@ -1315,14 +1308,7 @@ namespace OpenSim /// protected void SaveOar(string module, string[] cmdparams) { - if (cmdparams.Length > 2) - { - m_sceneManager.SaveCurrentSceneToArchive(cmdparams[2]); - } - else - { - m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME); - } + m_sceneManager.SaveCurrentSceneToArchive(cmdparams); } private static string CombineParams(string[] commandParams, int pos) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index cc18f1a9ef..391856bbc2 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -75,11 +75,6 @@ namespace OpenSim /// protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; - /// - /// The file used to load and save an opensimulator archive if no filename has been specified - /// - protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; - public ConfigSettings ConfigurationSettings { get { return m_configSettings; } diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 8d4f91b159..181f4c66ce 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -45,6 +45,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver private Scene m_scene; + /// + /// The file used to load and save an opensimulator archive if no filename has been specified + /// + protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar"; + public string Name { get { return "RegionArchiverModule"; } @@ -80,6 +85,38 @@ namespace OpenSim.Region.CoreModules.World.Archiver { } + /// + /// Load a whole region from an opensimulator archive. + /// + /// + public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) + { + if (cmdparams.Length > 2) + { + DearchiveRegion(cmdparams[2]); + } + else + { + DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); + } + } + + /// + /// Save a region to a file, including all the assets needed to restore it. + /// + /// + public void HandleSaveOarConsoleCommand(string module, string[] cmdparams) + { + if (cmdparams.Length > 2) + { + ArchiveRegion(cmdparams[2]); + } + else + { + ArchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); + } + } + public void ArchiveRegion(string savePath) { ArchiveRegion(savePath, Guid.Empty); diff --git a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs index 9ad2036ff1..1a8babcdaf 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionArchiverModule.cs @@ -34,7 +34,10 @@ namespace OpenSim.Region.Framework.Interfaces /// Interface to region archive functionality /// public interface IRegionArchiverModule - { + { + void HandleLoadOarConsoleCommand(string module, string[] cmdparams); + void HandleSaveOarConsoleCommand(string module, string[] cmdparams); + /// /// Archive the region to the given path /// diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index dfaa7eae8d..c2e3370eb0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -241,24 +241,24 @@ namespace OpenSim.Region.Framework.Scenes /// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets /// as well as the details of the prims themselves. /// - /// - public void SaveCurrentSceneToArchive(string filename) + /// + public void SaveCurrentSceneToArchive(string[] cmdparams) { IRegionArchiverModule archiver = CurrentOrFirstScene.RequestModuleInterface(); if (archiver != null) - archiver.ArchiveRegion(filename); + archiver.HandleSaveOarConsoleCommand(string.Empty, cmdparams); } /// /// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload /// their assets to the asset service. /// - /// - public void LoadArchiveToCurrentScene(string filename) + /// + public void LoadArchiveToCurrentScene(string[] cmdparams) { IRegionArchiverModule archiver = CurrentOrFirstScene.RequestModuleInterface(); if (archiver != null) - archiver.DearchiveRegion(filename); + archiver.HandleLoadOarConsoleCommand(string.Empty, cmdparams); } public string SaveCurrentSceneMapToXmlString() From 73dcbbd57ac3272bb416e20280a791aa03d2a185 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 24 Nov 2009 17:32:14 +0000 Subject: [PATCH 3/8] minor: remove some mono compiler warnings --- .../ClientStack/LindenUDP/LLClientView.cs | 4 ++- OpenSim/Tools/Compiler/Program.cs | 26 ++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 07466e2a6c..4221212651 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -8130,8 +8130,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP //lsrp.RequestData.RequestFlags; //lsrp.RequestData.Filter; - return true; +// return true; } + private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack) { RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; @@ -8152,6 +8153,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } + private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack) { diff --git a/OpenSim/Tools/Compiler/Program.cs b/OpenSim/Tools/Compiler/Program.cs index b18e029be2..249e18b402 100644 --- a/OpenSim/Tools/Compiler/Program.cs +++ b/OpenSim/Tools/Compiler/Program.cs @@ -36,7 +36,8 @@ namespace OpenSim.Tools.LSL.Compiler { class Program { - private static Dictionary, KeyValuePair> m_positionMap; +// Commented out because generated warning since m_positionMap could never be anything other than null +// private static Dictionary, KeyValuePair> m_positionMap; private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); static void Main(string[] args) @@ -210,16 +211,16 @@ namespace OpenSim.Tools.LSL.Compiler sfs.Close(); string posmap = String.Empty; - if (m_positionMap != null) - { - foreach (KeyValuePair, KeyValuePair> kvp in m_positionMap) - { - KeyValuePair k = kvp.Key; - KeyValuePair v = kvp.Value; - posmap += String.Format("{0},{1},{2},{3}\n", - k.Key, k.Value, v.Key, v.Value); - } - } +// if (m_positionMap != null) +// { +// foreach (KeyValuePair, KeyValuePair> kvp in m_positionMap) +// { +// KeyValuePair k = kvp.Key; +// KeyValuePair v = kvp.Value; +// posmap += String.Format("{0},{1},{2},{3}\n", +// k.Key, k.Value, v.Key, v.Value); +// } +// } buf = enc.GetBytes(posmap); @@ -253,7 +254,8 @@ namespace OpenSim.Tools.LSL.Compiler private static KeyValuePair FindErrorPosition(int line, int col) { - return FindErrorPosition(line, col, m_positionMap); + //return FindErrorPosition(line, col, m_positionMap); + return FindErrorPosition(line, col, null); } private class kvpSorter : IComparer> From c083ab682425d13a7369e3f82c82ccbc3c65102a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 24 Nov 2009 17:47:09 +0000 Subject: [PATCH 4/8] make save and load oar slightly more robust by always closing the archive streams even if there has been an error --- .../World/Archiver/ArchiveReadRequest.cs | 15 +++++++------ .../Archiver/ArchiveWriteRequestExecution.cs | 22 ++++++++++++++----- .../ArchiveWriteRequestPreparation.cs | 6 +++++ 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 70a225e7c1..34b81d809a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -103,14 +103,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver List serialisedSceneObjects = new List(); List serialisedParcels = new List(); string filePath = "NONE"; + + TarArchiveReader archive = new TarArchiveReader(m_loadStream); + byte[] data; + TarArchiveReader.TarEntryType entryType; try { - TarArchiveReader archive = new TarArchiveReader(m_loadStream); - - byte[] data; - TarArchiveReader.TarEntryType entryType; - while ((data = archive.ReadEntry(out filePath, out entryType)) != null) { //m_log.DebugFormat( @@ -152,8 +151,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver } //m_log.Debug("[ARCHIVER]: Reached end of archive"); - - archive.Close(); } catch (Exception e) { @@ -163,6 +160,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_scene.EventManager.TriggerOarFileLoaded(m_requestId, m_errorMessage); return; } + finally + { + archive.Close(); + } m_log.InfoFormat("[ARCHIVER]: Restored {0} assets", successfulAssetRestores); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs index f039be8238..75c4557d97 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs @@ -79,6 +79,22 @@ namespace OpenSim.Region.CoreModules.World.Archiver protected internal void ReceivedAllAssets( ICollection assetsFoundUuids, ICollection assetsNotFoundUuids) + { + try + { + Save(assetsFoundUuids, assetsNotFoundUuids); + } + finally + { + m_archiveWriter.Close(); + } + + m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_scene.RegionInfo.RegionName); + + m_scene.EventManager.TriggerOarFileSaved(m_requestId, String.Empty); + } + + protected internal void Save(ICollection assetsFoundUuids, ICollection assetsNotFoundUuids) { foreach (UUID uuid in assetsNotFoundUuids) { @@ -143,12 +159,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver } m_log.InfoFormat("[ARCHIVER]: Added scene objects to archive."); - - m_archiveWriter.Close(); - - m_log.InfoFormat("[ARCHIVER]: Finished writing out OAR for {0}", m_scene.RegionInfo.RegionName); - - m_scene.EventManager.TriggerOarFileSaved(m_requestId, String.Empty); } /// diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 9e4fbbe2f8..f08d8eced5 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -56,6 +56,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// Constructor /// + /// + /// The path to which to save data. + /// The id associated with this request + /// + /// If there was a problem opening a stream for the file specified by the savePath + /// public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId) { m_scene = scene; From f605d59136ef5a6ada9f332fb775f58adc1ec36a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 24 Nov 2009 18:27:31 +0000 Subject: [PATCH 5/8] Make load/save iar slightly better in the face of io failures by always attempting to close the streams --- .../Archiver/InventoryArchiveReadRequest.cs | 68 ++++++++++-------- .../Archiver/InventoryArchiveWriteRequest.cs | 72 ++++++++++--------- 2 files changed, 77 insertions(+), 63 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 9e76d79313..8532d03122 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs @@ -121,45 +121,51 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver byte[] data; TarArchiveReader.TarEntryType entryType; - while ((data = archive.ReadEntry(out filePath, out entryType)) != null) + + try { - if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) + while ((data = archive.ReadEntry(out filePath, out entryType)) != null) { - if (LoadAsset(filePath, data)) - successfulAssetRestores++; - else - failedAssetRestores++; - - if ((successfulAssetRestores) % 50 == 0) - m_log.DebugFormat( - "[INVENTORY ARCHIVER]: Loaded {0} assets...", - successfulAssetRestores); - } - else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) - { - InventoryFolderBase foundFolder - = ReplicateArchivePathToUserInventory( - filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, - rootDestinationFolder, foldersCreated, nodesLoaded); - - if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) + if (filePath.StartsWith(ArchiveConstants.ASSETS_PATH)) { - InventoryItemBase item = LoadItem(data, foundFolder); - - if (item != null) + if (LoadAsset(filePath, data)) + successfulAssetRestores++; + else + failedAssetRestores++; + + if ((successfulAssetRestores) % 50 == 0) + m_log.DebugFormat( + "[INVENTORY ARCHIVER]: Loaded {0} assets...", + successfulAssetRestores); + } + else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) + { + InventoryFolderBase foundFolder + = ReplicateArchivePathToUserInventory( + filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, + rootDestinationFolder, foldersCreated, nodesLoaded); + + if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY != entryType) { - successfulItemRestores++; - - // If we're loading an item directly into the given destination folder then we need to record - // it separately from any loaded root folders - if (rootDestinationFolder == foundFolder) - nodesLoaded.Add(item); + InventoryItemBase item = LoadItem(data, foundFolder); + + if (item != null) + { + successfulItemRestores++; + + // If we're loading an item directly into the given destination folder then we need to record + // it separately from any loaded root folders + if (rootDestinationFolder == foundFolder) + nodesLoaded.Add(item); + } } } } } - - archive.Close(); + finally + { + archive.Close(); + } m_log.DebugFormat( "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 6e11f3625e..c85d974646 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -117,19 +117,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver } protected void ReceivedAllAssets(ICollection assetsFoundUuids, ICollection assetsNotFoundUuids) - { - // We're almost done. Just need to write out the control file now - m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile()); - m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); - + { Exception reportedException = null; bool succeeded = true; - + try - { + { + // We're almost done. Just need to write out the control file now + m_archiveWriter.WriteFile(ArchiveConstants.CONTROL_FILE_PATH, Create0p1ControlFile()); + m_log.InfoFormat("[ARCHIVER]: Added control file to archive."); + m_archiveWriter.Close(); } - catch (IOException e) + catch (Exception e) { m_saveStream.Close(); reportedException = e; @@ -261,39 +261,47 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver //inventoryItem = m_userInfo.RootFolder.FindItemByPath(m_invPath); } - m_archiveWriter = new TarArchiveWriter(m_saveStream); - - if (inventoryFolder != null) - { - m_log.DebugFormat( - "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", - inventoryFolder.Name, inventoryFolder.ID, m_invPath); - - //recurse through all dirs getting dirs and files - SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); - } - else if (inventoryItem != null) - { - m_log.DebugFormat( - "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", - inventoryItem.Name, inventoryItem.ID, m_invPath); - - SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); - } - else + if (null == inventoryFolder && null == inventoryItem) { // We couldn't find the path indicated - m_saveStream.Close(); string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", errorMessage); m_module.TriggerInventoryArchiveSaved( m_id, false, m_userInfo, m_invPath, m_saveStream, new Exception(errorMessage)); - return; + return; } + + m_archiveWriter = new TarArchiveWriter(m_saveStream); - // Don't put all this profile information into the archive right now. - //SaveUsers(); + try + { + if (inventoryFolder != null) + { + m_log.DebugFormat( + "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", + inventoryFolder.Name, inventoryFolder.ID, m_invPath); + + //recurse through all dirs getting dirs and files + SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); + } + else if (inventoryItem != null) + { + m_log.DebugFormat( + "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", + inventoryItem.Name, inventoryItem.ID, m_invPath); + + SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); + } + + // Don't put all this profile information into the archive right now. + //SaveUsers(); + } + catch (Exception) + { + m_archiveWriter.Close(); + throw; + } new AssetsRequest( new AssetsArchiver(m_archiveWriter), m_assetUuids.Keys, From abddb60b8d0aba7b68e2494957aedfec66a772cc Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Wed, 25 Nov 2009 02:51:11 -0500 Subject: [PATCH 6/8] * Attempt number 1 to stop the repeating crouch animation that sometimes happens. * This tries to address it by correcting one potential bug where it never resets the falltimer. * This tries to address it by telling Physics that we're not flying this step.. instead of waiting until the next step when the next agent update comes along. --- .../Framework/Scenes/Animation/ScenePresenceAnimator.cs | 6 ++++++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 2e4c260093..da1104a5ba 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -200,7 +200,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation else if (move.Z < 0f) { if (actor != null && actor.IsColliding) + { + //Console.WriteLine("LAND"); return "LAND"; + } else return "HOVER_DOWN"; } @@ -249,7 +252,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation float landElapsed = (float)(Environment.TickCount - m_animTickFall) / 1000f; if (landElapsed <= FALL_DELAY) + { + m_animTickFall = 0; return "LAND"; + } } m_animTickFall = 0; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5604e3d3f0..33717b1a24 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1445,7 +1445,10 @@ namespace OpenSim.Region.Framework.Scenes // nesting this check because LengthSquared() is expensive and we don't // want to do it every step when flying. if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX)) + { StopFlying(); + m_physicsActor.Flying = false; + } } } From f493249bc3bc969405e0dd96c0959f32b0cd0980 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 25 Nov 2009 08:38:49 +0000 Subject: [PATCH 7/8] Add wildcard to prebuild include. Seems each file can only hold one project --- prebuild.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prebuild.xml b/prebuild.xml index 047b66d5fd..26535fb606 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -3414,7 +3414,7 @@ - + From a642968fd548e7bb7f3e47e937e209526226d0c0 Mon Sep 17 00:00:00 2001 From: "Teravus Ovares (Dan Olivares)" Date: Wed, 25 Nov 2009 04:00:52 -0500 Subject: [PATCH 8/8] * Reverting last commit.. because it just made it worse. --- .../Framework/Scenes/Animation/ScenePresenceAnimator.cs | 6 ------ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 --- 2 files changed, 9 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index da1104a5ba..2e4c260093 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -200,10 +200,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation else if (move.Z < 0f) { if (actor != null && actor.IsColliding) - { - //Console.WriteLine("LAND"); return "LAND"; - } else return "HOVER_DOWN"; } @@ -252,10 +249,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation float landElapsed = (float)(Environment.TickCount - m_animTickFall) / 1000f; if (landElapsed <= FALL_DELAY) - { - m_animTickFall = 0; return "LAND"; - } } m_animTickFall = 0; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 33717b1a24..5604e3d3f0 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1445,10 +1445,7 @@ namespace OpenSim.Region.Framework.Scenes // nesting this check because LengthSquared() is expensive and we don't // want to do it every step when flying. if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX)) - { StopFlying(); - m_physicsActor.Flying = false; - } } }