* Fixes a bug saving the current sun phase to the estate_settings file.
parent
1fb16688d1
commit
42c5dca989
|
@ -302,13 +302,19 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
|
||||||
args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY;
|
args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY;
|
||||||
args.regionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags);
|
args.regionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags);
|
||||||
args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
|
args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess;
|
||||||
args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour;
|
|
||||||
|
if (m_scene.RegionInfo.EstateSettings.useFixedSun)
|
||||||
|
args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour;
|
||||||
|
else
|
||||||
|
args.sunHour = m_scene.EventManager.GetSunLindenHour();
|
||||||
|
|
||||||
args.terrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit;
|
args.terrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit;
|
||||||
args.terrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit;
|
args.terrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit;
|
||||||
args.useEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun;
|
args.useEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun;
|
||||||
args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
|
args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight;
|
||||||
args.simName = m_scene.RegionInfo.RegionName;
|
args.simName = m_scene.RegionInfo.RegionName;
|
||||||
|
|
||||||
|
|
||||||
remote_client.sendRegionInfoToEstateMenu(args);
|
remote_client.sendRegionInfoToEstateMenu(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -230,6 +230,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
|
||||||
scene.EventManager.OnClientClosed += ClientLoggedOut;
|
scene.EventManager.OnClientClosed += ClientLoggedOut;
|
||||||
scene.EventManager.OnEstateToolsTimeUpdate += EstateToolsTimeUpdate;
|
scene.EventManager.OnEstateToolsTimeUpdate += EstateToolsTimeUpdate;
|
||||||
|
scene.EventManager.OnGetSunLindenHour += GetLindenEstateHourFromCurrentTime;
|
||||||
|
|
||||||
ready = true;
|
ready = true;
|
||||||
|
|
||||||
|
@ -256,6 +257,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
m_scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
|
||||||
m_scene.EventManager.OnClientClosed -= ClientLoggedOut;
|
m_scene.EventManager.OnClientClosed -= ClientLoggedOut;
|
||||||
m_scene.EventManager.OnEstateToolsTimeUpdate -= EstateToolsTimeUpdate;
|
m_scene.EventManager.OnEstateToolsTimeUpdate -= EstateToolsTimeUpdate;
|
||||||
|
m_scene.EventManager.OnGetSunLindenHour -= GetLindenEstateHourFromCurrentTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
|
@ -300,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
// set estate settings for region access to sun position
|
// set estate settings for region access to sun position
|
||||||
m_scene.RegionInfo.EstateSettings.sunPosition = Position;
|
m_scene.RegionInfo.EstateSettings.sunPosition = Position;
|
||||||
m_scene.RegionInfo.EstateSettings.sunHour = GetLindenEstateHourFromCurrentTime();
|
//m_scene.RegionInfo.EstateSettings.sunHour = GetLindenEstateHourFromCurrentTime();
|
||||||
}
|
}
|
||||||
public void ForceSunUpdateToAllClients()
|
public void ForceSunUpdateToAllClients()
|
||||||
{
|
{
|
||||||
|
|
|
@ -228,6 +228,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public delegate void ChatBroadcastEvent(Object sender, ChatFromViewerArgs chat);
|
public delegate void ChatBroadcastEvent(Object sender, ChatFromViewerArgs chat);
|
||||||
public event ChatBroadcastEvent OnChatBroadcast;
|
public event ChatBroadcastEvent OnChatBroadcast;
|
||||||
|
|
||||||
|
public delegate float SunLindenHour();
|
||||||
|
public event SunLindenHour OnGetSunLindenHour;
|
||||||
|
|
||||||
public class MoneyTransferArgs : EventArgs
|
public class MoneyTransferArgs : EventArgs
|
||||||
{
|
{
|
||||||
public LLUUID sender;
|
public LLUUID sender;
|
||||||
|
@ -350,6 +353,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private ScriptTimerEvent handlerScriptTimerEvent = null;
|
private ScriptTimerEvent handlerScriptTimerEvent = null;
|
||||||
private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null;
|
private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null;
|
||||||
|
|
||||||
|
private SunLindenHour handlerSunGetLindenHour = null;
|
||||||
|
|
||||||
public void TriggerOnScriptChangedEvent(uint localID, uint change)
|
public void TriggerOnScriptChangedEvent(uint localID, uint change)
|
||||||
{
|
{
|
||||||
handlerScriptChangedEvent = OnScriptChangedEvent;
|
handlerScriptChangedEvent = OnScriptChangedEvent;
|
||||||
|
@ -810,5 +815,15 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour);
|
handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float GetSunLindenHour()
|
||||||
|
{
|
||||||
|
handlerSunGetLindenHour = OnGetSunLindenHour;
|
||||||
|
if (handlerSunGetLindenHour != null)
|
||||||
|
{
|
||||||
|
return handlerSunGetLindenHour();
|
||||||
|
}
|
||||||
|
return 6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue