aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs17
2 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 5b08155..d89ca28 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -833,6 +833,7 @@ namespace OpenSim.Region.Environment.Scenes
833 if (presence.PhysicsActor != null) 833 if (presence.PhysicsActor != null)
834 { 834 {
835 phyScene.RemoveAvatar(presence.PhysicsActor); 835 phyScene.RemoveAvatar(presence.PhysicsActor);
836 presence.PhysicsActor = null;
836 } 837 }
837 }); 838 });
838 839
@@ -1028,7 +1029,7 @@ namespace OpenSim.Region.Environment.Scenes
1028 { 1029 {
1029 if (m_scenePresences.ContainsKey(agentID)) 1030 if (m_scenePresences.ContainsKey(agentID))
1030 { 1031 {
1031 m_scenePresences[agentID].MakeAvatar(position, isFlying); 1032 m_scenePresences[agentID].MakeAvatarPhysical(position, isFlying);
1032 } 1033 }
1033 } 1034 }
1034 } 1035 }
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();