aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Terrain
diff options
context:
space:
mode:
authorRevolution2010-02-14 15:41:57 -0600
committerMelanie2010-02-14 22:18:46 +0000
commit9821c4f566e11c75c8d87721777480c5b2e2bd4e (patch)
tree04cf7edb4cfe07e1f50ce3ee0ca5d846e6a7a379 /OpenSim/Region/CoreModules/World/Terrain
parent* SQLite match code casing with regionsettings table field casing (what's wit... (diff)
downloadopensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.zip
opensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.tar.gz
opensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.tar.bz2
opensim-SC_OLD-9821c4f566e11c75c8d87721777480c5b2e2bd4e.tar.xz
Revolution is on the roll again! :)
Fixes: Undo, T-pose of others on login, modifiedBulletX works again, feet now stand on the ground instead of in the ground, adds checks to CombatModule. Adds: Redo, Land Undo, checks to agentUpdate (so one can not fall off of a region), more vehicle parts. Finishes almost all of LSL (1 function left, 2 events). Direct flames and kudos to Revolution, please Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain')
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs41
1 files changed, 41 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index a40828b..1e7ea7b 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -84,6 +84,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
84 private ITerrainChannel m_revert; 84 private ITerrainChannel m_revert;
85 private Scene m_scene; 85 private Scene m_scene;
86 private volatile bool m_tainted; 86 private volatile bool m_tainted;
87 private readonly UndoStack<LandUndoState> m_undo = new UndoStack<LandUndoState>(5);
87 88
88 #region ICommandableModule Members 89 #region ICommandableModule Members
89 90
@@ -174,6 +175,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain
174 175
175 #region ITerrainModule Members 176 #region ITerrainModule Members
176 177
178 public void UndoTerrain(ITerrainChannel channel)
179 {
180 m_channel = channel;
181 }
182
177 /// <summary> 183 /// <summary>
178 /// Loads a terrain file from disk and installs it in the scene. 184 /// Loads a terrain file from disk and installs it in the scene.
179 /// </summary> 185 /// </summary>
@@ -574,6 +580,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
574 { 580 {
575 client.OnModifyTerrain += client_OnModifyTerrain; 581 client.OnModifyTerrain += client_OnModifyTerrain;
576 client.OnBakeTerrain += client_OnBakeTerrain; 582 client.OnBakeTerrain += client_OnBakeTerrain;
583 client.OnLandUndo += client_OnLandUndo;
577 } 584 }
578 585
579 /// <summary> 586 /// <summary>
@@ -664,6 +671,19 @@ namespace OpenSim.Region.CoreModules.World.Terrain
664 return changesLimited; 671 return changesLimited;
665 } 672 }
666 673
674 private void client_OnLandUndo(IClientAPI client)
675 {
676 lock (m_undo)
677 {
678 if (m_undo.Count > 0)
679 {
680 LandUndoState goback = m_undo.Pop();
681 if (goback != null)
682 goback.PlaybackState();
683 }
684 }
685 }
686
667 /// <summary> 687 /// <summary>
668 /// Sends a copy of the current terrain to the scenes clients 688 /// Sends a copy of the current terrain to the scenes clients
669 /// </summary> 689 /// </summary>
@@ -718,6 +738,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
718 } 738 }
719 if (allowed) 739 if (allowed)
720 { 740 {
741 StoreUndoState();
721 m_painteffects[(StandardTerrainEffects) action].PaintEffect( 742 m_painteffects[(StandardTerrainEffects) action].PaintEffect(
722 m_channel, allowMask, west, south, height, size, seconds); 743 m_channel, allowMask, west, south, height, size, seconds);
723 744
@@ -758,6 +779,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
758 779
759 if (allowed) 780 if (allowed)
760 { 781 {
782 StoreUndoState();
761 m_floodeffects[(StandardTerrainEffects) action].FloodEffect( 783 m_floodeffects[(StandardTerrainEffects) action].FloodEffect(
762 m_channel, fillArea, size); 784 m_channel, fillArea, size);
763 785
@@ -782,6 +804,25 @@ namespace OpenSim.Region.CoreModules.World.Terrain
782 } 804 }
783 } 805 }
784 806
807 private void StoreUndoState()
808 {
809 lock (m_undo)
810 {
811 if (m_undo.Count > 0)
812 {
813 LandUndoState last = m_undo.Peek();
814 if (last != null)
815 {
816 if (last.Compare(m_channel))
817 return;
818 }
819 }
820
821 LandUndoState nUndo = new LandUndoState(this, m_channel);
822 m_undo.Push(nUndo);
823 }
824 }
825
785 #region Console Commands 826 #region Console Commands
786 827
787 private void InterfaceLoadFile(Object[] args) 828 private void InterfaceLoadFile(Object[] args)