diff options
author | Melanie Thielker | 2010-08-10 22:52:51 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-08-10 22:52:51 +0200 |
commit | af60b8ac16361f7b60318a93bf51f094375d0c26 (patch) | |
tree | 51aab31eb59fdd7480abdc3526e0a1331f7f9017 | |
parent | Fix a nullref issue in the AgentSetAppearance packet handler when removing th... (diff) | |
download | opensim-SC_OLD-af60b8ac16361f7b60318a93bf51f094375d0c26.zip opensim-SC_OLD-af60b8ac16361f7b60318a93bf51f094375d0c26.tar.gz opensim-SC_OLD-af60b8ac16361f7b60318a93bf51f094375d0c26.tar.bz2 opensim-SC_OLD-af60b8ac16361f7b60318a93bf51f094375d0c26.tar.xz |
Set triggering the texture and height update on a two second timer. This fixes
the texture rubberbanding.
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index c6a1614..27e492b 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -29,6 +29,7 @@ using System.Collections.Generic; | |||
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Security; | 31 | using System.Security; |
32 | using System.Timers; | ||
32 | using log4net; | 33 | using log4net; |
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | using OpenMetaverse; | 35 | using OpenMetaverse; |
@@ -45,6 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
45 | private delegate void LookupUUIDS(List<UUID> uuidLst); | 46 | private delegate void LookupUUIDS(List<UUID> uuidLst); |
46 | 47 | ||
47 | private Scene m_scene; | 48 | private Scene m_scene; |
49 | private Timer m_regionChangeTimer = new Timer(); | ||
48 | 50 | ||
49 | private EstateTerrainXferHandler TerrainUploader; | 51 | private EstateTerrainXferHandler TerrainUploader; |
50 | 52 | ||
@@ -898,6 +900,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
898 | m_scene.RegisterModuleInterface<IEstateModule>(this); | 900 | m_scene.RegisterModuleInterface<IEstateModule>(this); |
899 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; | 901 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; |
900 | m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; | 902 | m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; |
903 | m_regionChangeTimer.AutoReset = false; | ||
904 | m_regionChangeTimer.Interval = 2000; | ||
905 | m_regionChangeTimer.Elapsed += RaiseRegionInfoChange; | ||
901 | 906 | ||
902 | m_scene.AddCommand(this, "set terrain texture", | 907 | m_scene.AddCommand(this, "set terrain texture", |
903 | "set terrain texture <number> <uuid> [<x>] [<y>]", | 908 | "set terrain texture <number> <uuid> [<x>] [<y>]", |
@@ -949,8 +954,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
949 | break; | 954 | break; |
950 | } | 955 | } |
951 | m_scene.RegionInfo.RegionSettings.Save(); | 956 | m_scene.RegionInfo.RegionSettings.Save(); |
952 | //TriggerRegionInfoChange(); | 957 | TriggerRegionInfoChange(); |
953 | TriggerEstateInfoChange(); | ||
954 | sendRegionInfoPacketToAll(); | 958 | sendRegionInfoPacketToAll(); |
955 | 959 | ||
956 | } | 960 | } |
@@ -996,8 +1000,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
996 | break; | 1000 | break; |
997 | } | 1001 | } |
998 | m_scene.RegionInfo.RegionSettings.Save(); | 1002 | m_scene.RegionInfo.RegionSettings.Save(); |
999 | //TriggerRegionInfoChange(); | 1003 | TriggerRegionInfoChange(); |
1000 | TriggerEstateInfoChange(); | ||
1001 | sendRegionHandshakeToAll(); | 1004 | sendRegionHandshakeToAll(); |
1002 | } | 1005 | } |
1003 | } | 1006 | } |
@@ -1170,6 +1173,12 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1170 | 1173 | ||
1171 | protected void TriggerRegionInfoChange() | 1174 | protected void TriggerRegionInfoChange() |
1172 | { | 1175 | { |
1176 | m_regionChangeTimer.Stop(); | ||
1177 | m_regionChangeTimer.Start(); | ||
1178 | } | ||
1179 | |||
1180 | protected void RaiseRegionInfoChange(object sender, ElapsedEventArgs e) | ||
1181 | { | ||
1173 | ChangeDelegate change = OnRegionInfoChange; | 1182 | ChangeDelegate change = OnRegionInfoChange; |
1174 | 1183 | ||
1175 | if (change != null) | 1184 | if (change != null) |