aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-25 23:16:12 -0700
committerJohn Hurliman2009-10-26 18:23:43 -0700
commitd199767e6991d6f368661fce9c5a072e564b8a4b (patch)
treed9347b8a424c0164e208f908613aa8fe1511444b /OpenSim/Region/Framework
parent* Double the priority on avatar bake texture requests to get avatars rezzing ... (diff)
downloadopensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.zip
opensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.tar.gz
opensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.tar.bz2
opensim-SC_OLD-d199767e6991d6f368661fce9c5a072e564b8a4b.tar.xz
Experimental change of PhysicsVector to Vector3. Untested
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs46
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs18
4 files changed, 45 insertions, 49 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 7eafef7..6c34056 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4606,7 +4606,7 @@ namespace OpenSim.Region.Framework.Scenes
4606 { 4606 {
4607 case PhysicsJointType.Ball: 4607 case PhysicsJointType.Ball:
4608 { 4608 {
4609 PhysicsVector jointAnchor = PhysicsScene.GetJointAnchor(joint); 4609 Vector3 jointAnchor = PhysicsScene.GetJointAnchor(joint);
4610 Vector3 proxyPos = new Vector3(jointAnchor.X, jointAnchor.Y, jointAnchor.Z); 4610 Vector3 proxyPos = new Vector3(jointAnchor.X, jointAnchor.Y, jointAnchor.Z);
4611 jointProxyObject.ParentGroup.UpdateGroupPosition(proxyPos); // schedules the entire group for a terse update 4611 jointProxyObject.ParentGroup.UpdateGroupPosition(proxyPos); // schedules the entire group for a terse update
4612 } 4612 }
@@ -4614,7 +4614,7 @@ namespace OpenSim.Region.Framework.Scenes
4614 4614
4615 case PhysicsJointType.Hinge: 4615 case PhysicsJointType.Hinge:
4616 { 4616 {
4617 PhysicsVector jointAnchor = PhysicsScene.GetJointAnchor(joint); 4617 Vector3 jointAnchor = PhysicsScene.GetJointAnchor(joint);
4618 4618
4619 // Normally, we would just ask the physics scene to return the axis for the joint. 4619 // Normally, we would just ask the physics scene to return the axis for the joint.
4620 // Unfortunately, ODE sometimes returns <0,0,0> for the joint axis, which should 4620 // Unfortunately, ODE sometimes returns <0,0,0> for the joint axis, which should
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 34ada4c..38a0cff 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1479,8 +1479,8 @@ namespace OpenSim.Region.Framework.Scenes
1479 dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape( 1479 dupe.RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(
1480 dupe.RootPart.Name, 1480 dupe.RootPart.Name,
1481 pbs, 1481 pbs,
1482 new PhysicsVector(dupe.RootPart.AbsolutePosition.X, dupe.RootPart.AbsolutePosition.Y, dupe.RootPart.AbsolutePosition.Z), 1482 dupe.RootPart.AbsolutePosition,
1483 new PhysicsVector(dupe.RootPart.Scale.X, dupe.RootPart.Scale.Y, dupe.RootPart.Scale.Z), 1483 dupe.RootPart.Scale,
1484 dupe.RootPart.RotationOffset, 1484 dupe.RootPart.RotationOffset,
1485 dupe.RootPart.PhysActor.IsPhysical); 1485 dupe.RootPart.PhysActor.IsPhysical);
1486 1486
@@ -1595,7 +1595,7 @@ namespace OpenSim.Region.Framework.Scenes
1595 */ 1595 */
1596 } 1596 }
1597 1597
1598 public void applyImpulse(PhysicsVector impulse) 1598 public void applyImpulse(Vector3 impulse)
1599 { 1599 {
1600 // We check if rootpart is null here because scripts don't delete if you delete the host. 1600 // We check if rootpart is null here because scripts don't delete if you delete the host.
1601 // This means that unfortunately, we can pass a null physics actor to Simulate! 1601 // This means that unfortunately, we can pass a null physics actor to Simulate!
@@ -1622,7 +1622,7 @@ namespace OpenSim.Region.Framework.Scenes
1622 } 1622 }
1623 } 1623 }
1624 1624
1625 public void applyAngularImpulse(PhysicsVector impulse) 1625 public void applyAngularImpulse(Vector3 impulse)
1626 { 1626 {
1627 // We check if rootpart is null here because scripts don't delete if you delete the host. 1627 // We check if rootpart is null here because scripts don't delete if you delete the host.
1628 // This means that unfortunately, we can pass a null physics actor to Simulate! 1628 // This means that unfortunately, we can pass a null physics actor to Simulate!
@@ -1641,7 +1641,7 @@ namespace OpenSim.Region.Framework.Scenes
1641 } 1641 }
1642 } 1642 }
1643 1643
1644 public void setAngularImpulse(PhysicsVector impulse) 1644 public void setAngularImpulse(Vector3 impulse)
1645 { 1645 {
1646 // We check if rootpart is null here because scripts don't delete if you delete the host. 1646 // We check if rootpart is null here because scripts don't delete if you delete the host.
1647 // This means that unfortunately, we can pass a null physics actor to Simulate! 1647 // This means that unfortunately, we can pass a null physics actor to Simulate!
@@ -1672,8 +1672,8 @@ namespace OpenSim.Region.Framework.Scenes
1672 { 1672 {
1673 if (!IsAttachment) 1673 if (!IsAttachment)
1674 { 1674 {
1675 PhysicsVector torque = rootpart.PhysActor.Torque; 1675 Vector3 torque = rootpart.PhysActor.Torque;
1676 return new Vector3(torque.X, torque.Y, torque.Z); 1676 return torque;
1677 } 1677 }
1678 } 1678 }
1679 } 1679 }
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Framework.Scenes
1706 { 1706 {
1707 if (rootpart.PhysActor != null) 1707 if (rootpart.PhysActor != null)
1708 { 1708 {
1709 rootpart.PhysActor.PIDTarget = new PhysicsVector(target.X, target.Y, target.Z); 1709 rootpart.PhysActor.PIDTarget = target;
1710 rootpart.PhysActor.PIDTau = tau; 1710 rootpart.PhysActor.PIDTau = tau;
1711 rootpart.PhysActor.PIDActive = true; 1711 rootpart.PhysActor.PIDActive = true;
1712 } 1712 }
@@ -2374,7 +2374,7 @@ namespace OpenSim.Region.Framework.Scenes
2374 if (m_rootPart.PhysActor.IsPhysical) 2374 if (m_rootPart.PhysActor.IsPhysical)
2375 { 2375 {
2376 Vector3 llmoveforce = pos - AbsolutePosition; 2376 Vector3 llmoveforce = pos - AbsolutePosition;
2377 PhysicsVector grabforce = new PhysicsVector(llmoveforce.X, llmoveforce.Y, llmoveforce.Z); 2377 Vector3 grabforce = llmoveforce;
2378 grabforce = (grabforce / 10) * m_rootPart.PhysActor.Mass; 2378 grabforce = (grabforce / 10) * m_rootPart.PhysActor.Mass;
2379 m_rootPart.PhysActor.AddForce(grabforce,true); 2379 m_rootPart.PhysActor.AddForce(grabforce,true);
2380 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 2380 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
@@ -2479,7 +2479,7 @@ namespace OpenSim.Region.Framework.Scenes
2479 rotationAxis.Normalize(); 2479 rotationAxis.Normalize();
2480 2480
2481 //m_log.Error("SCENE OBJECT GROUP]: rotation axis is " + rotationAxis); 2481 //m_log.Error("SCENE OBJECT GROUP]: rotation axis is " + rotationAxis);
2482 PhysicsVector spinforce = new PhysicsVector(rotationAxis.X, rotationAxis.Y, rotationAxis.Z); 2482 Vector3 spinforce = new Vector3(rotationAxis.X, rotationAxis.Y, rotationAxis.Z);
2483 spinforce = (spinforce/8) * m_rootPart.PhysActor.Mass; // 8 is an arbitrary torque scaling factor 2483 spinforce = (spinforce/8) * m_rootPart.PhysActor.Mass; // 8 is an arbitrary torque scaling factor
2484 m_rootPart.PhysActor.AddAngularForce(spinforce,true); 2484 m_rootPart.PhysActor.AddAngularForce(spinforce,true);
2485 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); 2485 m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor);
@@ -2706,8 +2706,7 @@ namespace OpenSim.Region.Framework.Scenes
2706 if (scale.Z > m_scene.m_maxPhys) 2706 if (scale.Z > m_scene.m_maxPhys)
2707 scale.Z = m_scene.m_maxPhys; 2707 scale.Z = m_scene.m_maxPhys;
2708 } 2708 }
2709 part.PhysActor.Size = 2709 part.PhysActor.Size = scale;
2710 new PhysicsVector(scale.X, scale.Y, scale.Z);
2711 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); 2710 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
2712 } 2711 }
2713 //if (part.UUID != m_rootPart.UUID) 2712 //if (part.UUID != m_rootPart.UUID)
@@ -2851,8 +2850,7 @@ namespace OpenSim.Region.Framework.Scenes
2851 2850
2852 if (part.PhysActor != null) 2851 if (part.PhysActor != null)
2853 { 2852 {
2854 part.PhysActor.Size = 2853 part.PhysActor.Size = prevScale;
2855 new PhysicsVector(prevScale.X, prevScale.Y, prevScale.Z);
2856 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); 2854 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
2857 } 2855 }
2858 2856
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a87bde0..70f3112 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -167,9 +167,9 @@ namespace OpenSim.Region.Framework.Scenes
167 167
168 [XmlIgnore] 168 [XmlIgnore]
169 public uint AttachmentPoint; 169 public uint AttachmentPoint;
170 170
171 [XmlIgnore] 171 [XmlIgnore]
172 public PhysicsVector RotationAxis = new PhysicsVector(1f, 1f, 1f); 172 public Vector3 RotationAxis = Vector3.One;
173 173
174 [XmlIgnore] 174 [XmlIgnore]
175 public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this 175 public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this
@@ -537,13 +537,13 @@ namespace OpenSim.Region.Framework.Scenes
537 // Root prim actually goes at Position 537 // Root prim actually goes at Position
538 if (_parentID == 0) 538 if (_parentID == 0)
539 { 539 {
540 PhysActor.Position = new PhysicsVector(value.X, value.Y, value.Z); 540 PhysActor.Position = value;
541 } 541 }
542 else 542 else
543 { 543 {
544 // To move the child prim in respect to the group position and rotation we have to calculate 544 // To move the child prim in respect to the group position and rotation we have to calculate
545 Vector3 resultingposition = GetWorldPosition(); 545 Vector3 resultingposition = GetWorldPosition();
546 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); 546 PhysActor.Position = resultingposition;
547 Quaternion resultingrot = GetWorldRotation(); 547 Quaternion resultingrot = GetWorldRotation();
548 PhysActor.Orientation = resultingrot; 548 PhysActor.Orientation = resultingrot;
549 } 549 }
@@ -585,7 +585,7 @@ namespace OpenSim.Region.Framework.Scenes
585 if (_parentID != 0 && PhysActor != null) 585 if (_parentID != 0 && PhysActor != null)
586 { 586 {
587 Vector3 resultingposition = GetWorldPosition(); 587 Vector3 resultingposition = GetWorldPosition();
588 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); 588 PhysActor.Position = resultingposition;
589 Quaternion resultingrot = GetWorldRotation(); 589 Quaternion resultingrot = GetWorldRotation();
590 PhysActor.Orientation = resultingrot; 590 PhysActor.Orientation = resultingrot;
591 591
@@ -675,7 +675,7 @@ namespace OpenSim.Region.Framework.Scenes
675 { 675 {
676 if (PhysActor.IsPhysical) 676 if (PhysActor.IsPhysical)
677 { 677 {
678 PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); 678 PhysActor.Velocity = value;
679 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 679 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
680 } 680 }
681 } 681 }
@@ -817,7 +817,7 @@ if (m_shape != null) {
817 { 817 {
818 if (m_parentGroup.Scene.PhysicsScene != null) 818 if (m_parentGroup.Scene.PhysicsScene != null)
819 { 819 {
820 PhysActor.Size = new PhysicsVector(m_shape.Scale.X, m_shape.Scale.Y, m_shape.Scale.Z); 820 PhysActor.Size = m_shape.Scale;
821 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 821 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
822 } 822 }
823 } 823 }
@@ -1225,7 +1225,7 @@ if (m_shape != null) {
1225 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 1225 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
1226 public void ApplyImpulse(Vector3 impulsei, bool localGlobalTF) 1226 public void ApplyImpulse(Vector3 impulsei, bool localGlobalTF)
1227 { 1227 {
1228 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); 1228 Vector3 impulse = impulsei;
1229 1229
1230 if (localGlobalTF) 1230 if (localGlobalTF)
1231 { 1231 {
@@ -1233,7 +1233,7 @@ if (m_shape != null) {
1233 Quaternion AXgrot = grot; 1233 Quaternion AXgrot = grot;
1234 Vector3 AXimpulsei = impulsei; 1234 Vector3 AXimpulsei = impulsei;
1235 Vector3 newimpulse = AXimpulsei * AXgrot; 1235 Vector3 newimpulse = AXimpulsei * AXgrot;
1236 impulse = new PhysicsVector(newimpulse.X, newimpulse.Y, newimpulse.Z); 1236 impulse = newimpulse;
1237 } 1237 }
1238 1238
1239 if (m_parentGroup != null) 1239 if (m_parentGroup != null)
@@ -1251,7 +1251,7 @@ if (m_shape != null) {
1251 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 1251 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
1252 public void ApplyAngularImpulse(Vector3 impulsei, bool localGlobalTF) 1252 public void ApplyAngularImpulse(Vector3 impulsei, bool localGlobalTF)
1253 { 1253 {
1254 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); 1254 Vector3 impulse = impulsei;
1255 1255
1256 if (localGlobalTF) 1256 if (localGlobalTF)
1257 { 1257 {
@@ -1259,7 +1259,7 @@ if (m_shape != null) {
1259 Quaternion AXgrot = grot; 1259 Quaternion AXgrot = grot;
1260 Vector3 AXimpulsei = impulsei; 1260 Vector3 AXimpulsei = impulsei;
1261 Vector3 newimpulse = AXimpulsei * AXgrot; 1261 Vector3 newimpulse = AXimpulsei * AXgrot;
1262 impulse = new PhysicsVector(newimpulse.X, newimpulse.Y, newimpulse.Z); 1262 impulse = newimpulse;
1263 } 1263 }
1264 1264
1265 if (m_parentGroup != null) 1265 if (m_parentGroup != null)
@@ -1277,7 +1277,7 @@ if (m_shape != null) {
1277 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 1277 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
1278 public void SetAngularImpulse(Vector3 impulsei, bool localGlobalTF) 1278 public void SetAngularImpulse(Vector3 impulsei, bool localGlobalTF)
1279 { 1279 {
1280 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); 1280 Vector3 impulse = impulsei;
1281 1281
1282 if (localGlobalTF) 1282 if (localGlobalTF)
1283 { 1283 {
@@ -1285,7 +1285,7 @@ if (m_shape != null) {
1285 Quaternion AXgrot = grot; 1285 Quaternion AXgrot = grot;
1286 Vector3 AXimpulsei = impulsei; 1286 Vector3 AXimpulsei = impulsei;
1287 Vector3 newimpulse = AXimpulsei * AXgrot; 1287 Vector3 newimpulse = AXimpulsei * AXgrot;
1288 impulse = new PhysicsVector(newimpulse.X, newimpulse.Y, newimpulse.Z); 1288 impulse = newimpulse;
1289 } 1289 }
1290 1290
1291 if (m_parentGroup != null) 1291 if (m_parentGroup != null)
@@ -1333,8 +1333,8 @@ if (m_shape != null) {
1333 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1333 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
1334 Name, 1334 Name,
1335 Shape, 1335 Shape,
1336 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z), 1336 AbsolutePosition,
1337 new PhysicsVector(Scale.X, Scale.Y, Scale.Z), 1337 Scale,
1338 RotationOffset, 1338 RotationOffset,
1339 RigidBody); 1339 RigidBody);
1340 1340
@@ -1523,7 +1523,7 @@ if (m_shape != null) {
1523 PhysicsJoint joint; 1523 PhysicsJoint joint;
1524 1524
1525 joint = m_parentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType, 1525 joint = m_parentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType,
1526 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z), 1526 AbsolutePosition,
1527 this.RotationOffset, 1527 this.RotationOffset,
1528 Description, 1528 Description,
1529 bodyNames, 1529 bodyNames,
@@ -1708,12 +1708,12 @@ if (m_shape != null) {
1708 } 1708 }
1709 } 1709 }
1710 1710
1711 public PhysicsVector GetForce() 1711 public Vector3 GetForce()
1712 { 1712 {
1713 if (PhysActor != null) 1713 if (PhysActor != null)
1714 return PhysActor.Force; 1714 return PhysActor.Force;
1715 else 1715 else
1716 return new PhysicsVector(); 1716 return Vector3.Zero;
1717 } 1717 }
1718 1718
1719 public void GetProperties(IClientAPI client) 1719 public void GetProperties(IClientAPI client)
@@ -2078,7 +2078,7 @@ if (m_shape != null) {
2078 } 2078 }
2079 } 2079 }
2080 2080
2081 public void PhysicsOutOfBounds(PhysicsVector pos) 2081 public void PhysicsOutOfBounds(Vector3 pos)
2082 { 2082 {
2083 m_log.Error("[PHYSICS]: Physical Object went out of bounds."); 2083 m_log.Error("[PHYSICS]: Physical Object went out of bounds.");
2084 2084
@@ -2564,7 +2564,7 @@ if (m_shape != null) {
2564 } 2564 }
2565 } 2565 }
2566 2566
2567 public void SetForce(PhysicsVector force) 2567 public void SetForce(Vector3 force)
2568 { 2568 {
2569 if (PhysActor != null) 2569 if (PhysActor != null)
2570 { 2570 {
@@ -2588,7 +2588,7 @@ if (m_shape != null) {
2588 } 2588 }
2589 } 2589 }
2590 2590
2591 public void SetVehicleVectorParam(int param, PhysicsVector value) 2591 public void SetVehicleVectorParam(int param, Vector3 value)
2592 { 2592 {
2593 if (PhysActor != null) 2593 if (PhysActor != null)
2594 { 2594 {
@@ -3430,8 +3430,8 @@ if (m_shape != null) {
3430 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 3430 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
3431 Name, 3431 Name,
3432 Shape, 3432 Shape,
3433 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z), 3433 AbsolutePosition,
3434 new PhysicsVector(Scale.X, Scale.Y, Scale.Z), 3434 Scale,
3435 RotationOffset, 3435 RotationOffset,
3436 UsePhysics); 3436 UsePhysics);
3437 3437
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0ac5be0..87fac0c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -434,7 +434,7 @@ namespace OpenSim.Region.Framework.Scenes
434 { 434 {
435 lock (m_scene.SyncRoot) 435 lock (m_scene.SyncRoot)
436 { 436 {
437 m_physicsActor.Position = new PhysicsVector(value.X, value.Y, value.Z); 437 m_physicsActor.Position = value;
438 } 438 }
439 } 439 }
440 catch (Exception e) 440 catch (Exception e)
@@ -474,7 +474,7 @@ namespace OpenSim.Region.Framework.Scenes
474 { 474 {
475 lock (m_scene.SyncRoot) 475 lock (m_scene.SyncRoot)
476 { 476 {
477 m_physicsActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); 477 m_physicsActor.Velocity = value;
478 } 478 }
479 } 479 }
480 catch (Exception e) 480 catch (Exception e)
@@ -1046,7 +1046,7 @@ namespace OpenSim.Region.Framework.Scenes
1046 m_avHeight = height; 1046 m_avHeight = height;
1047 if (PhysicsActor != null && !IsChildAgent) 1047 if (PhysicsActor != null && !IsChildAgent)
1048 { 1048 {
1049 PhysicsVector SetSize = new PhysicsVector(0.45f, 0.6f, m_avHeight); 1049 Vector3 SetSize = new Vector3(0.45f, 0.6f, m_avHeight);
1050 PhysicsActor.Size = SetSize; 1050 PhysicsActor.Size = SetSize;
1051 } 1051 }
1052 } 1052 }
@@ -3345,20 +3345,18 @@ namespace OpenSim.Region.Framework.Scenes
3345 3345
3346 PhysicsScene scene = m_scene.PhysicsScene; 3346 PhysicsScene scene = m_scene.PhysicsScene;
3347 3347
3348 PhysicsVector pVec = 3348 Vector3 pVec = AbsolutePosition;
3349 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,
3350 AbsolutePosition.Z);
3351 3349
3352 // Old bug where the height was in centimeters instead of meters 3350 // Old bug where the height was in centimeters instead of meters
3353 if (m_avHeight == 127.0f) 3351 if (m_avHeight == 127.0f)
3354 { 3352 {
3355 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, 1.56f), 3353 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new Vector3(0f, 0f, 1.56f),
3356 isFlying); 3354 isFlying);
3357 } 3355 }
3358 else 3356 else
3359 { 3357 {
3360 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, 3358 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
3361 new PhysicsVector(0, 0, m_avHeight), isFlying); 3359 new Vector3(0f, 0f, m_avHeight), isFlying);
3362 } 3360 }
3363 scene.AddPhysicsActorTaint(m_physicsActor); 3361 scene.AddPhysicsActorTaint(m_physicsActor);
3364 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; 3362 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
@@ -3369,7 +3367,7 @@ namespace OpenSim.Region.Framework.Scenes
3369 3367
3370 } 3368 }
3371 3369
3372 private void OutOfBoundsCall(PhysicsVector pos) 3370 private void OutOfBoundsCall(Vector3 pos)
3373 { 3371 {
3374 //bool flying = m_physicsActor.Flying; 3372 //bool flying = m_physicsActor.Flying;
3375 //RemoveFromPhysicalScene(); 3373 //RemoveFromPhysicalScene();
@@ -3592,7 +3590,7 @@ namespace OpenSim.Region.Framework.Scenes
3592 */ 3590 */
3593 } 3591 }
3594 3592
3595 internal void PushForce(PhysicsVector impulse) 3593 internal void PushForce(Vector3 impulse)
3596 { 3594 {
3597 if (PhysicsActor != null) 3595 if (PhysicsActor != null)
3598 { 3596 {