diff options
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 84b451f..cdb5ae2 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -99,6 +99,7 @@ namespace OpenSim.Region.Physics.Manager | |||
99 | { | 99 | { |
100 | public delegate void RequestTerseUpdate(); | 100 | public delegate void RequestTerseUpdate(); |
101 | public delegate void CollisionUpdate(EventArgs e); | 101 | public delegate void CollisionUpdate(EventArgs e); |
102 | public delegate void OutOfBounds(PhysicsVector pos); | ||
102 | 103 | ||
103 | #pragma warning disable 67 | 104 | #pragma warning disable 67 |
104 | public event PositionUpdate OnPositionUpdate; | 105 | public event PositionUpdate OnPositionUpdate; |
@@ -106,6 +107,7 @@ namespace OpenSim.Region.Physics.Manager | |||
106 | public event OrientationUpdate OnOrientationUpdate; | 107 | public event OrientationUpdate OnOrientationUpdate; |
107 | public event RequestTerseUpdate OnRequestTerseUpdate; | 108 | public event RequestTerseUpdate OnRequestTerseUpdate; |
108 | public event CollisionUpdate OnCollisionUpdate; | 109 | public event CollisionUpdate OnCollisionUpdate; |
110 | public event OutOfBounds OnOutOfBounds; | ||
109 | #pragma warning restore 67 | 111 | #pragma warning restore 67 |
110 | 112 | ||
111 | public static PhysicsActor Null | 113 | public static PhysicsActor Null |
@@ -131,6 +133,18 @@ namespace OpenSim.Region.Physics.Manager | |||
131 | } | 133 | } |
132 | 134 | ||
133 | } | 135 | } |
136 | public virtual void RaiseOutOfBounds(PhysicsVector pos) | ||
137 | { | ||
138 | // Make a temporary copy of the event to avoid possibility of | ||
139 | // a race condition if the last subscriber unsubscribes | ||
140 | // immediately after the null check and before the event is raised. | ||
141 | OutOfBounds handler = OnOutOfBounds; | ||
142 | if (handler != null) | ||
143 | { | ||
144 | OnOutOfBounds(pos); | ||
145 | } | ||
146 | |||
147 | } | ||
134 | public virtual void SendCollisionUpdate(EventArgs e) | 148 | public virtual void SendCollisionUpdate(EventArgs e) |
135 | { | 149 | { |
136 | CollisionUpdate handler = OnCollisionUpdate; | 150 | CollisionUpdate handler = OnCollisionUpdate; |