aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager/PhysicsActor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs20
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 2d8eb9a..049da96 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -36,14 +36,19 @@ namespace OpenSim.Region.Physics.Manager
36 36
37 public delegate void OrientationUpdate(Quaternion orientation); 37 public delegate void OrientationUpdate(Quaternion orientation);
38 38
39
40
39 41
40 42
41 public abstract class PhysicsActor 43 public abstract class PhysicsActor
42 { 44 {
45 public delegate void RequestTerseUpdate();
46
43#pragma warning disable 67 47#pragma warning disable 67
44 public event PositionUpdate OnPositionUpdate; 48 public event PositionUpdate OnPositionUpdate;
45 public event VelocityUpdate OnVelocityUpdate; 49 public event VelocityUpdate OnVelocityUpdate;
46 public event OrientationUpdate OnOrientationUpdate; 50 public event OrientationUpdate OnOrientationUpdate;
51 public event RequestTerseUpdate OnRequestTerseUpdate;
47#pragma warning restore 67 52#pragma warning restore 67
48 53
49 public static PhysicsActor Null 54 public static PhysicsActor Null
@@ -57,6 +62,19 @@ namespace OpenSim.Region.Physics.Manager
57 { 62 {
58 set; 63 set;
59 } 64 }
65 public virtual void RequestPhysicsterseUpdate()
66 {
67 // Make a temporary copy of the event to avoid possibility of
68 // a race condition if the last subscriber unsubscribes
69 // immediately after the null check and before the event is raised.
70 RequestTerseUpdate handler = OnRequestTerseUpdate;
71 if (handler != null)
72 {
73 OnRequestTerseUpdate();
74 }
75
76 }
77
60 78
61 public abstract PhysicsVector Position { get; set; } 79 public abstract PhysicsVector Position { get; set; }
62 80