aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs37
1 files changed, 19 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 39a885c..a7c7539 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1613,32 +1613,28 @@ namespace OpenSim.Region.Framework.Scenes
1613 bool controlland = (((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || 1613 bool controlland = (((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) ||
1614 ((flags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); 1614 ((flags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0));
1615 1615
1616
1617 //m_log.Debug("[CONTROL]: " +flags); 1616 //m_log.Debug("[CONTROL]: " +flags);
1618 // Applies a satisfying roll effect to the avatar when flying. 1617 // Applies a satisfying roll effect to the avatar when flying.
1619 if (((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) != 0) && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0)) 1618 if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) != 0 && (flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0)
1620 { 1619 {
1621 1620 ApplyFlyingRoll(
1622 ApplyFlyingRoll(FLY_ROLL_RADIANS_PER_UPDATE, ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0), ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0)); 1621 FLY_ROLL_RADIANS_PER_UPDATE,
1623 1622 (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0,
1624 1623 (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0);
1625 } 1624 }
1626 else if (((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) != 0) && 1625 else if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) != 0 &&
1627 ((flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0)) 1626 (flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0)
1628 { 1627 {
1629 ApplyFlyingRoll(-FLY_ROLL_RADIANS_PER_UPDATE, ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0), ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0)); 1628 ApplyFlyingRoll(
1630 1629 -FLY_ROLL_RADIANS_PER_UPDATE,
1631 1630 (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0,
1631 (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0);
1632 } 1632 }
1633 else 1633 else
1634 { 1634 {
1635 if (m_AngularVelocity.Z != 0) 1635 if (m_AngularVelocity.Z != 0)
1636 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); 1636 m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE);
1637 1637 }
1638 }
1639
1640
1641
1642 1638
1643 if (Flying && IsColliding && controlland) 1639 if (Flying && IsColliding && controlland)
1644 { 1640 {
@@ -2400,7 +2396,8 @@ namespace OpenSim.Region.Framework.Scenes
2400 /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> 2396 /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param>
2401 public void AddNewMovement(Vector3 vec) 2397 public void AddNewMovement(Vector3 vec)
2402 { 2398 {
2403// m_log.DebugFormat("[SCENE PRESENCE]: Adding new movement {0} for {1}", vec, Name); 2399// m_log.DebugFormat(
2400// "[SCENE PRESENCE]: Adding new movement {0} with rotation {1} for {2}", vec, Rotation, Name);
2404 2401
2405 Vector3 direc = vec * Rotation; 2402 Vector3 direc = vec * Rotation;
2406 direc.Normalize(); 2403 direc.Normalize();
@@ -2420,6 +2417,8 @@ namespace OpenSim.Region.Framework.Scenes
2420 2417
2421 direc *= 0.03f * 128f * SpeedModifier; 2418 direc *= 0.03f * 128f * SpeedModifier;
2422 2419
2420// m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name);
2421
2423 if (PhysicsActor != null) 2422 if (PhysicsActor != null)
2424 { 2423 {
2425 if (Flying) 2424 if (Flying)
@@ -2453,6 +2452,8 @@ namespace OpenSim.Region.Framework.Scenes
2453 } 2452 }
2454 } 2453 }
2455 2454
2455// m_log.DebugFormat("[SCENE PRESENCE]: Setting force to apply to {0} for {1}", direc, Name);
2456
2456 // TODO: Add the force instead of only setting it to support multiple forces per frame? 2457 // TODO: Add the force instead of only setting it to support multiple forces per frame?
2457 m_forceToApply = direc; 2458 m_forceToApply = direc;
2458 } 2459 }