aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2009-03-13 23:45:02 +0000
committerMelanie Thielker2009-03-13 23:45:02 +0000
commitddbf81fa07aac8098d9fa8d979969fffd5436f75 (patch)
treed65b3b280a53fe74253af2bfeee9bf3944dfa10b /OpenSim/Region/Framework/Scenes
parent* Support loading empty folders in an iar (diff)
downloadopensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.zip
opensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.tar.gz
opensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.tar.bz2
opensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.tar.xz
Thank you, mcortez, for a patch that fixes a number of long standing
issues with the sun module. Fixes Mantis #3295
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs33
1 files changed, 20 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 8a556d9..8621f70 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -202,10 +202,10 @@ namespace OpenSim.Region.Framework.Scenes
202 202
203 public event ScriptTimerEvent OnScriptTimerEvent; 203 public event ScriptTimerEvent OnScriptTimerEvent;
204 204
205 public delegate void EstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour); 205 public delegate void EstateToolsSunUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour);
206 public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); 206 public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID);
207 207
208 public event EstateToolsTimeUpdate OnEstateToolsTimeUpdate; 208 public event EstateToolsSunUpdate OnEstateToolsSunUpdate;
209 209
210 public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); 210 public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj);
211 public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene; 211 public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene;
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Framework.Scenes
264 public event ChatBroadcastEvent OnChatBroadcast; 264 public event ChatBroadcastEvent OnChatBroadcast;
265 265
266 public delegate float SunLindenHour(); 266 public delegate float SunLindenHour();
267 public event SunLindenHour OnGetSunLindenHour; 267 public event SunLindenHour OnGetCurrentTimeAsLindenSunHour;
268 268
269 /// <summary> 269 /// <summary>
270 /// Called when oar file has finished loading, although 270 /// Called when oar file has finished loading, although
@@ -411,14 +411,14 @@ namespace OpenSim.Region.Framework.Scenes
411 private ParcelPrimCountTainted handlerParcelPrimCountTainted = null; 411 private ParcelPrimCountTainted handlerParcelPrimCountTainted = null;
412 private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null; 412 private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null;
413 private ScriptTimerEvent handlerScriptTimerEvent = null; 413 private ScriptTimerEvent handlerScriptTimerEvent = null;
414 private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null; 414 private EstateToolsSunUpdate handlerEstateToolsSunUpdate = null;
415 415
416 private ScriptColliding handlerCollidingStart = null; 416 private ScriptColliding handlerCollidingStart = null;
417 private ScriptColliding handlerColliding = null; 417 private ScriptColliding handlerColliding = null;
418 private ScriptColliding handlerCollidingEnd = null; 418 private ScriptColliding handlerCollidingEnd = null;
419 private GetScriptRunning handlerGetScriptRunning = null; 419 private GetScriptRunning handlerGetScriptRunning = null;
420 420
421 private SunLindenHour handlerSunGetLindenHour = null; 421 private SunLindenHour handlerCurrentTimeAsLindenSunHour = null;
422 private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null; 422 private OnSetRootAgentSceneDelegate handlerSetRootAgentScene = null;
423 423
424 private OarFileLoaded handlerOarFileLoaded = null; 424 private OarFileLoaded handlerOarFileLoaded = null;
@@ -910,21 +910,28 @@ namespace OpenSim.Region.Framework.Scenes
910 } 910 }
911 } 911 }
912 912
913 public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour) 913 /// <summary>
914 /// Updates the system as to how the position of the sun should be handled.
915 /// </summary>
916 /// <param name="regionHandle"></param>
917 /// <param name="FixedTime">True if the Sun Position is fixed</param>
918 /// <param name="useEstateTime">True if the Estate Settings should be used instead of region</param>
919 /// <param name="FixedSunHour">The hour 0.0 <= FixedSunHour <= 24.0 at which the sun is fixed at. Sun Hour 0 is sun-rise, when Day/Night ratio is 1:1</param>
920 public void TriggerEstateToolsSunUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float FixedSunHour)
914 { 921 {
915 handlerEstateToolsTimeUpdate = OnEstateToolsTimeUpdate; 922 handlerEstateToolsSunUpdate = OnEstateToolsSunUpdate;
916 if (handlerEstateToolsTimeUpdate != null) 923 if (handlerEstateToolsSunUpdate != null)
917 { 924 {
918 handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour); 925 handlerEstateToolsSunUpdate(regionHandle, FixedTime, useEstateTime, FixedSunHour);
919 } 926 }
920 } 927 }
921 928
922 public float GetSunLindenHour() 929 public float GetCurrentTimeAsSunLindenHour()
923 { 930 {
924 handlerSunGetLindenHour = OnGetSunLindenHour; 931 handlerCurrentTimeAsLindenSunHour = OnGetCurrentTimeAsLindenSunHour;
925 if (handlerSunGetLindenHour != null) 932 if (handlerCurrentTimeAsLindenSunHour != null)
926 { 933 {
927 return handlerSunGetLindenHour(); 934 return handlerCurrentTimeAsLindenSunHour();
928 } 935 }
929 return 6; 936 return 6;
930 } 937 }