aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-03 04:33:17 +0000
committerTeravus Ovares2008-05-03 04:33:17 +0000
commit07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de (patch)
tree7b19dfcf5db2afcd1bbacbf55298f14669b0f615 /OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
parentThank you kindly, Melanie for a patch to solve (diff)
downloadopensim-SC_OLD-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.zip
opensim-SC_OLD-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.tar.gz
opensim-SC_OLD-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.tar.bz2
opensim-SC_OLD-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.tar.xz
* Committing some collision stuffs that I'm working on.
* Nothing user facing yet.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODECharacter.cs')
-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}