aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-02 10:01:02 +0000
committerTeravus Ovares2008-06-02 10:01:02 +0000
commit42c5dca9896964f89dbd6c71bfa0057940eda80d (patch)
treea6bcebf118c05b02403b8f0c2de1ced2857c4cd9
parentcleanup: uncommenting null-op else tree in TaskInventoryItem.cs (diff)
downloadopensim-SC_OLD-42c5dca9896964f89dbd6c71bfa0057940eda80d.zip
opensim-SC_OLD-42c5dca9896964f89dbd6c71bfa0057940eda80d.tar.gz
opensim-SC_OLD-42c5dca9896964f89dbd6c71bfa0057940eda80d.tar.bz2
opensim-SC_OLD-42c5dca9896964f89dbd6c71bfa0057940eda80d.tar.xz
* Fixes a bug saving the current sun phase to the estate_settings file.
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/EventManager.cs15
3 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index 6476a4b..147e4aa 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -302,13 +302,19 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
302 args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY; 302 args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY;
303 args.regionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags); 303 args.regionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags);
304 args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess; 304 args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
305 args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour; 305
306 if (m_scene.RegionInfo.EstateSettings.useFixedSun)
307 args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour;
308 else
309 args.sunHour = m_scene.EventManager.GetSunLindenHour();
310
306 args.terrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit; 311 args.terrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit;
307 args.terrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit; 312 args.terrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit;
308 args.useEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun; 313 args.useEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun;
309 args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight; 314 args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
310 args.simName = m_scene.RegionInfo.RegionName; 315 args.simName = m_scene.RegionInfo.RegionName;
311 316
317
312 remote_client.sendRegionInfoToEstateMenu(args); 318 remote_client.sendRegionInfoToEstateMenu(args);
313 } 319 }
314 320
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index 713060f..bb4a568 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -230,6 +230,7 @@ namespace OpenSim.Region.Environment.Modules
230 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 230 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
231 scene.EventManager.OnClientClosed += ClientLoggedOut; 231 scene.EventManager.OnClientClosed += ClientLoggedOut;
232 scene.EventManager.OnEstateToolsTimeUpdate += EstateToolsTimeUpdate; 232 scene.EventManager.OnEstateToolsTimeUpdate += EstateToolsTimeUpdate;
233 scene.EventManager.OnGetSunLindenHour += GetLindenEstateHourFromCurrentTime;
233 234
234 ready = true; 235 ready = true;
235 236
@@ -256,6 +257,7 @@ namespace OpenSim.Region.Environment.Modules
256 m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel; 257 m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
257 m_scene.EventManager.OnClientClosed -= ClientLoggedOut; 258 m_scene.EventManager.OnClientClosed -= ClientLoggedOut;
258 m_scene.EventManager.OnEstateToolsTimeUpdate -= EstateToolsTimeUpdate; 259 m_scene.EventManager.OnEstateToolsTimeUpdate -= EstateToolsTimeUpdate;
260 m_scene.EventManager.OnGetSunLindenHour -= GetLindenEstateHourFromCurrentTime;
259 } 261 }
260 262
261 public string Name 263 public string Name
@@ -300,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules
300 302
301 // set estate settings for region access to sun position 303 // set estate settings for region access to sun position
302 m_scene.RegionInfo.EstateSettings.sunPosition = Position; 304 m_scene.RegionInfo.EstateSettings.sunPosition = Position;
303 m_scene.RegionInfo.EstateSettings.sunHour = GetLindenEstateHourFromCurrentTime(); 305 //m_scene.RegionInfo.EstateSettings.sunHour = GetLindenEstateHourFromCurrentTime();
304 } 306 }
305 public void ForceSunUpdateToAllClients() 307 public void ForceSunUpdateToAllClients()
306 { 308 {
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs
index c7d21c8..ea44f9a 100644
--- a/OpenSim/Region/Environment/Scenes/EventManager.cs
+++ b/OpenSim/Region/Environment/Scenes/EventManager.cs
@@ -228,6 +228,9 @@ namespace OpenSim.Region.Environment.Scenes
228 public delegate void ChatBroadcastEvent(Object sender, ChatFromViewerArgs chat); 228 public delegate void ChatBroadcastEvent(Object sender, ChatFromViewerArgs chat);
229 public event ChatBroadcastEvent OnChatBroadcast; 229 public event ChatBroadcastEvent OnChatBroadcast;
230 230
231 public delegate float SunLindenHour();
232 public event SunLindenHour OnGetSunLindenHour;
233
231 public class MoneyTransferArgs : EventArgs 234 public class MoneyTransferArgs : EventArgs
232 { 235 {
233 public LLUUID sender; 236 public LLUUID sender;
@@ -350,6 +353,8 @@ namespace OpenSim.Region.Environment.Scenes
350 private ScriptTimerEvent handlerScriptTimerEvent = null; 353 private ScriptTimerEvent handlerScriptTimerEvent = null;
351 private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null; 354 private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null;
352 355
356 private SunLindenHour handlerSunGetLindenHour = null;
357
353 public void TriggerOnScriptChangedEvent(uint localID, uint change) 358 public void TriggerOnScriptChangedEvent(uint localID, uint change)
354 { 359 {
355 handlerScriptChangedEvent = OnScriptChangedEvent; 360 handlerScriptChangedEvent = OnScriptChangedEvent;
@@ -810,5 +815,15 @@ namespace OpenSim.Region.Environment.Scenes
810 handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour); 815 handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour);
811 } 816 }
812 } 817 }
818
819 public float GetSunLindenHour()
820 {
821 handlerSunGetLindenHour = OnGetSunLindenHour;
822 if (handlerSunGetLindenHour != null)
823 {
824 return handlerSunGetLindenHour();
825 }
826 return 6;
827 }
813 } 828 }
814} 829}