aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authordan miller2007-09-21 02:31:36 +0000
committerdan miller2007-09-21 02:31:36 +0000
commitd3050724d8fdb0de5b87285b782de9c4d2f9bac7 (patch)
tree2d7f2fa65b1e4dcf70b6d7c52a3336a4148d0a60 /OpenSim/Region/Environment/Scenes/ScenePresence.cs
parent* Removed Unused 'Entity' superclass (diff)
downloadopensim-SC-d3050724d8fdb0de5b87285b782de9c4d2f9bac7.zip
opensim-SC-d3050724d8fdb0de5b87285b782de9c4d2f9bac7.tar.gz
opensim-SC-d3050724d8fdb0de5b87285b782de9c4d2f9bac7.tar.bz2
opensim-SC-d3050724d8fdb0de5b87285b782de9c4d2f9bac7.tar.xz
physics-related fixes; should stabilize border crossings
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index c0b9a35..1a38244 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -336,7 +336,7 @@ namespace OpenSim.Region.Environment.Scenes
336 } 336 }
337 } 337 }
338 338
339 public void MakeAvatar(LLVector3 pos, bool isFlying) 339 public void MakeAvatarPhysical(LLVector3 pos, bool isFlying)
340 { 340 {
341 newAvatar = true; 341 newAvatar = true;
342 childAgent = false; 342 childAgent = false;
@@ -363,6 +363,7 @@ namespace OpenSim.Region.Environment.Scenes
363 private void RemoveFromPhysicalScene() 363 private void RemoveFromPhysicalScene()
364 { 364 {
365 m_scene.PhysScene.RemoveAvatar( this.PhysicsActor ); 365 m_scene.PhysScene.RemoveAvatar( this.PhysicsActor );
366 this.PhysicsActor = null;
366 } 367 }
367 368
368 /// <summary> 369 /// <summary>
@@ -429,6 +430,15 @@ namespace OpenSim.Region.Environment.Scenes
429 /// <param name="pack"></param> 430 /// <param name="pack"></param>
430 public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation) 431 public void HandleAgentUpdate(IClientAPI remoteClient, uint flags, LLQuaternion bodyRotation)
431 { 432 {
433 if (childAgent)
434 {
435 Console.WriteLine("DEBUG: HandleAgentUpdate: child agent");
436 return;
437 }
438 if(PhysicsActor==null) {
439 Console.WriteLine("DEBUG: HandleAgentUpdate: null PhysicsActor!");
440 return;
441 }
432 int i = 0; 442 int i = 0;
433 bool update_movementflag = false; 443 bool update_movementflag = false;
434 bool update_rotation = false; 444 bool update_rotation = false;
@@ -501,6 +511,11 @@ namespace OpenSim.Region.Environment.Scenes
501 511
502 protected void AddNewMovement(Vector3 vec, Quaternion rotation) 512 protected void AddNewMovement(Vector3 vec, Quaternion rotation)
503 { 513 {
514 if (childAgent)
515 {
516 Console.WriteLine("DEBUG: AddNewMovement: child agent");
517 return;
518 }
504 NewForce newVelocity = new NewForce(); 519 NewForce newVelocity = new NewForce();
505 Vector3 direc = rotation*vec; 520 Vector3 direc = rotation*vec;
506 direc.Normalize(); 521 direc.Normalize();