diff options
author | Teravus Ovares | 2007-11-08 15:22:36 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-11-08 15:22:36 +0000 |
commit | fcc276a68da1da15fac802725a116b3e8d7f7197 (patch) | |
tree | b69d28ba9ef087154aa7480b6be89cee8d1b2389 /OpenSim/Region/Physics/Manager | |
parent | reformatted OpenSimAssetSet.xml (whitespace only) (diff) | |
download | opensim-SC_OLD-fcc276a68da1da15fac802725a116b3e8d7f7197.zip opensim-SC_OLD-fcc276a68da1da15fac802725a116b3e8d7f7197.tar.gz opensim-SC_OLD-fcc276a68da1da15fac802725a116b3e8d7f7197.tar.bz2 opensim-SC_OLD-fcc276a68da1da15fac802725a116b3e8d7f7197.tar.xz |
* Fixed occasional character drift caused by sim not sending the avatar's final resting velocity.
* Added Smooth moving prim
* Added event to PhysicsActor RequestPhysicsterseUpdate to allow physics plugins to be able to schedule a terse update.
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 20 |
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 | ||