aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager/PhysicsActor.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/Manager/PhysicsActor.cs
parentThank you kindly, Melanie for a patch to solve (diff)
downloadopensim-SC-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.zip
opensim-SC-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.tar.gz
opensim-SC-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.tar.bz2
opensim-SC-07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de.tar.xz
* Committing some collision stuffs that I'm working on.
* Nothing user facing yet.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs35
1 files changed, 30 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index f48f129..046c285 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -51,9 +51,9 @@ namespace OpenSim.Region.Physics.Manager
51 public int m_colliderType; 51 public int m_colliderType;
52 public int m_GenericStartEnd; 52 public int m_GenericStartEnd;
53 //public uint m_LocalID; 53 //public uint m_LocalID;
54 public List<uint> m_objCollisionList; 54 public Dictionary<uint,float> m_objCollisionList = new Dictionary<uint,float>();
55 55
56 public CollisionEventUpdate(uint localID, int colliderType, int GenericStartEnd, List<uint> objCollisionList) 56 public CollisionEventUpdate(uint localID, int colliderType, int GenericStartEnd, Dictionary<uint, float> objCollisionList)
57 { 57 {
58 m_colliderType = colliderType; 58 m_colliderType = colliderType;
59 m_GenericStartEnd = GenericStartEnd; 59 m_GenericStartEnd = GenericStartEnd;
@@ -64,7 +64,8 @@ namespace OpenSim.Region.Physics.Manager
64 { 64 {
65 m_colliderType = (int) ActorTypes.Unknown; 65 m_colliderType = (int) ActorTypes.Unknown;
66 m_GenericStartEnd = 1; 66 m_GenericStartEnd = 1;
67 m_objCollisionList = null; 67 // m_objCollisionList = null;
68 m_objCollisionList = new Dictionary<uint, float>();
68 } 69 }
69 70
70 public int collidertype 71 public int collidertype
@@ -79,9 +80,17 @@ namespace OpenSim.Region.Physics.Manager
79 set { m_GenericStartEnd = value; } 80 set { m_GenericStartEnd = value; }
80 } 81 }
81 82
82 public void addCollider(uint localID) 83 public void addCollider(uint localID, float depth)
83 { 84 {
84 m_objCollisionList.Add(localID); 85 if (!m_objCollisionList.ContainsKey(localID))
86 {
87 m_objCollisionList.Add(localID, depth);
88 }
89 else
90 {
91 if (m_objCollisionList[localID] < depth)
92 m_objCollisionList[localID] = depth;
93 }
85 } 94 }
86 } 95 }
87 96
@@ -189,6 +198,9 @@ namespace OpenSim.Region.Physics.Manager
189 198
190 public abstract void AddForce(PhysicsVector force); 199 public abstract void AddForce(PhysicsVector force);
191 public abstract void SetMomentum(PhysicsVector momentum); 200 public abstract void SetMomentum(PhysicsVector momentum);
201 public abstract void SubscribeEvents(int ms);
202 public abstract void UnSubscribeEvents();
203 public abstract bool SubscribedEvents();
192 } 204 }
193 205
194 public class NullPhysicsActor : PhysicsActor 206 public class NullPhysicsActor : PhysicsActor
@@ -370,5 +382,18 @@ namespace OpenSim.Region.Physics.Manager
370 public override void SetMomentum(PhysicsVector momentum) 382 public override void SetMomentum(PhysicsVector momentum)
371 { 383 {
372 } 384 }
385
386 public override void SubscribeEvents(int ms)
387 {
388
389 }
390 public override void UnSubscribeEvents()
391 {
392
393 }
394 public override bool SubscribedEvents()
395 {
396 return false;
397 }
373 } 398 }
374} 399}