aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 9f6b14e..39f94cb 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -112,6 +112,9 @@ namespace OpenSim.Region.Physics.OdePlugin
112 public d.Mass ShellMass; 112 public d.Mass ShellMass;
113 public bool collidelock = false; 113 public bool collidelock = false;
114 114
115 public int m_eventsubscription = 0;
116 private CollisionEventUpdate CollisionEventsThisFrame = null;
117
115 public OdeCharacter(String avName, OdeScene parent_scene, PhysicsVector pos, CollisionLocker dode, PhysicsVector size) 118 public OdeCharacter(String avName, OdeScene parent_scene, PhysicsVector pos, CollisionLocker dode, PhysicsVector size)
116 { 119 {
117 ode = dode; 120 ode = dode;
@@ -863,5 +866,33 @@ namespace OpenSim.Region.Physics.OdePlugin
863 public override PhysicsVector PIDTarget { set { return; } } 866 public override PhysicsVector PIDTarget { set { return; } }
864 public override bool PIDActive { set { return; } } 867 public override bool PIDActive { set { return; } }
865 public override float PIDTau { set { return; } } 868 public override float PIDTau { set { return; } }
869 public override void SubscribeEvents(int ms)
870 {
871 m_eventsubscription = ms;
872 }
873 public override void UnSubscribeEvents()
874 {
875 m_eventsubscription = 0;
876 }
877 public void AddCollisionEvent(uint CollidedWith, float depth)
878 {
879 if (m_eventsubscription > 0)
880 CollisionEventsThisFrame.addCollider(CollidedWith,depth);
881 }
882
883 public void SendCollisions()
884 {
885 if (m_eventsubscription > 0)
886 {
887 base.SendCollisionUpdate(CollisionEventsThisFrame);
888 CollisionEventsThisFrame = new CollisionEventUpdate();
889 }
890 }
891 public override bool SubscribedEvents()
892 {
893 if (m_eventsubscription > 0)
894 return true;
895 return false;
896 }
866 } 897 }
867} 898}