mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
* Moved all events except gridcomms and regioncomms over to Event Delegate instances to prevent event race conditions
This commit is contained in:
@@ -47,6 +47,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
#region Events
|
||||
|
||||
public event PhysicsCrash UnRecoverableError;
|
||||
private PhysicsCrash handler001 = null;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -715,9 +716,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public void physicsBasedCrash()
|
||||
{
|
||||
if (UnRecoverableError != null)
|
||||
handler001 = UnRecoverableError;
|
||||
if (handler001 != null)
|
||||
{
|
||||
UnRecoverableError();
|
||||
handler001();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
public virtual void Restart(int seconds)
|
||||
{
|
||||
m_log.Error("[REGION]: passing Restart Message up the namespace");
|
||||
OnRestart(RegionInfo);
|
||||
restart handler001 = OnRestart;
|
||||
if (handler001 != null)
|
||||
handler001(RegionInfo);
|
||||
}
|
||||
|
||||
public virtual bool PresenceChildStatus(LLUUID avatarID)
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
protected ulong m_regionHandle;
|
||||
|
||||
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
||||
private PrimCountTaintedDelegate handler001 = null;
|
||||
|
||||
/// <summary>
|
||||
/// Signal whether the non-inventory attributes of any prims in the group have changed
|
||||
@@ -1525,9 +1526,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
/// </summary>
|
||||
public void TriggerTainted()
|
||||
{
|
||||
if (OnPrimCountTainted != null)
|
||||
handler001 = OnPrimCountTainted;
|
||||
if (handler001 != null)
|
||||
{
|
||||
OnPrimCountTainted();
|
||||
handler001();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,6 +116,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
private readonly List<ulong> m_knownChildRegions = new List<ulong>();
|
||||
//neighbouring regions we have enabled a child agent in
|
||||
|
||||
private SignificantClientMovement handler001 = null; //OnSignificantClientMovement;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Implemented Control Flags
|
||||
@@ -1482,9 +1484,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
if (Util.GetDistanceTo(AbsolutePosition, posLastSignificantMove) > 0.5)
|
||||
{
|
||||
posLastSignificantMove = AbsolutePosition;
|
||||
if (OnSignificantClientMovement != null)
|
||||
|
||||
if (handler001 != null)
|
||||
{
|
||||
OnSignificantClientMovement(m_controllingClient);
|
||||
handler001(m_controllingClient);
|
||||
m_scene.NotifyMyCoarseLocationChange();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
public event SendStatResult OnSendStatsResult;
|
||||
|
||||
private SendStatResult handler001 = null;
|
||||
|
||||
private enum Stats : uint
|
||||
{
|
||||
TimeDilation = 0,
|
||||
@@ -245,9 +247,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
|
||||
statpack.Stat = sb;
|
||||
|
||||
if (OnSendStatsResult != null)
|
||||
handler001 = OnSendStatsResult;
|
||||
if (handler001 != null)
|
||||
{
|
||||
OnSendStatsResult(statpack);
|
||||
handler001(statpack);
|
||||
}
|
||||
resetvalues();
|
||||
m_report.Enabled = true;
|
||||
|
||||
Reference in New Issue
Block a user