aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 747ae71..fa22c78 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -73,7 +73,8 @@ public class BSCharacter : BSPhysObject
73 private bool _kinematic; 73 private bool _kinematic;
74 private float _buoyancy; 74 private float _buoyancy;
75 75
76 public override BulletBody Body { get; set; } 76 public override BulletBody BSBody { get; set; }
77 public override BulletShape BSShape { get; set; }
77 public override BSLinkset Linkset { get; set; } 78 public override BSLinkset Linkset { get; set; }
78 79
79 private int _subscribedEventsMs = 0; 80 private int _subscribedEventsMs = 0;
@@ -92,6 +93,7 @@ public class BSCharacter : BSPhysObject
92 _localID = localID; 93 _localID = localID;
93 _avName = avName; 94 _avName = avName;
94 Scene = parent_scene; 95 Scene = parent_scene;
96 _physicsActorType = (int)ActorTypes.Agent;
95 _position = pos; 97 _position = pos;
96 _size = size; 98 _size = size;
97 _flying = isFlying; 99 _flying = isFlying;
@@ -128,9 +130,9 @@ public class BSCharacter : BSPhysObject
128 // Set the buoyancy for flying. This will be refactored when all the settings happen in C# 130 // Set the buoyancy for flying. This will be refactored when all the settings happen in C#
129 BulletSimAPI.SetObjectBuoyancy(Scene.WorldID, LocalID, _buoyancy); 131 BulletSimAPI.SetObjectBuoyancy(Scene.WorldID, LocalID, _buoyancy);
130 132
131 Body = new BulletBody(LocalID, BulletSimAPI.GetBodyHandle2(Scene.World.Ptr, LocalID)); 133 BSBody = new BulletBody(LocalID, BulletSimAPI.GetBodyHandle2(Scene.World.Ptr, LocalID));
132 // avatars get all collisions no matter what (makes walking on ground and such work) 134 // avatars get all collisions no matter what (makes walking on ground and such work)
133 BulletSimAPI.AddToCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 135 BulletSimAPI.AddToCollisionFlags2(BSBody.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
134 }); 136 });
135 137
136 return; 138 return;
@@ -440,7 +442,7 @@ public class BSCharacter : BSPhysObject
440 Scene.TaintedObject("BSCharacter.AddForce", delegate() 442 Scene.TaintedObject("BSCharacter.AddForce", delegate()
441 { 443 {
442 DetailLog("{0},BSCharacter.setAddForce,taint,addedForce={1}", LocalID, _force); 444 DetailLog("{0},BSCharacter.setAddForce,taint,addedForce={1}", LocalID, _force);
443 BulletSimAPI.AddObjectForce2(Body.Ptr, _force); 445 BulletSimAPI.SetObjectForce2(BSBody.Ptr, _force);
444 }); 446 });
445 } 447 }
446 else 448 else
@@ -465,7 +467,7 @@ public class BSCharacter : BSPhysObject
465 467
466 Scene.TaintedObject("BSCharacter.SubscribeEvents", delegate() 468 Scene.TaintedObject("BSCharacter.SubscribeEvents", delegate()
467 { 469 {
468 BulletSimAPI.AddToCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 470 BulletSimAPI.AddToCollisionFlags2(BSBody.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
469 }); 471 });
470 } 472 }
471 } 473 }