diff options
author | Melanie Thielker | 2014-10-05 20:50:09 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-10-05 20:50:09 +0200 |
commit | 241257cf55b6e757da98a24b5a9370e72d961020 (patch) | |
tree | 059b757d749318f442197ae494d949d65af098ba | |
parent | Merge branch 'ubitworkmaster' (diff) | |
parent | reduce some avatar engine strenght (diff) | |
download | opensim-SC_OLD-241257cf55b6e757da98a24b5a9370e72d961020.zip opensim-SC_OLD-241257cf55b6e757da98a24b5a9370e72d961020.tar.gz opensim-SC_OLD-241257cf55b6e757da98a24b5a9370e72d961020.tar.bz2 opensim-SC_OLD-241257cf55b6e757da98a24b5a9370e72d961020.tar.xz |
Merge branch 'ubitworkmaster'
3 files changed, 26 insertions, 21 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 2d1b0df..ade908d 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -307,15 +307,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
307 | ); | 307 | ); |
308 | 308 | ||
309 | // Check control flags | 309 | // Check control flags |
310 | /* not in use | 310 | /* not in use |
311 | bool heldForward = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS)) != 0); | 311 | bool heldForward = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS)) != 0); |
312 | bool heldBack = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG)) != 0); | 312 | bool heldBack = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG)) != 0); |
313 | bool heldLeft = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS)) != 0); | 313 | bool heldLeft = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS)) != 0); |
314 | bool heldRight = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG)) != 0); | 314 | bool heldRight = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG)) != 0); |
315 | */ | 315 | */ |
316 | bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; | 316 | bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; |
317 | bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT; | 317 | bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT; |
318 | // bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS)) != 0); | 318 | // bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_POS)) != 0); |
319 | // excluded nudge up so it doesn't trigger jump state | 319 | // excluded nudge up so it doesn't trigger jump state |
320 | bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS)) != 0); | 320 | bool heldUp = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_POS)) != 0); |
321 | bool heldDown = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG)) != 0); | 321 | bool heldDown = ((controlFlags & (AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG | AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG)) != 0); |
@@ -328,7 +328,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
328 | heldTurnLeft = false; | 328 | heldTurnLeft = false; |
329 | heldTurnRight = false; | 329 | heldTurnRight = false; |
330 | } | 330 | } |
331 | 331 | ||
332 | #endregion Inputs | 332 | #endregion Inputs |
333 | 333 | ||
334 | // no physics actor case | 334 | // no physics actor case |
@@ -432,7 +432,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
432 | #region Jumping // section added for jumping... | 432 | #region Jumping // section added for jumping... |
433 | 433 | ||
434 | if (isColliding && heldUp && currentControlState != motionControlStates.jumping) | 434 | if (isColliding && heldUp && currentControlState != motionControlStates.jumping) |
435 | { | 435 | { |
436 | // Start jumping, prejump | 436 | // Start jumping, prejump |
437 | currentControlState = motionControlStates.jumping; | 437 | currentControlState = motionControlStates.jumping; |
438 | m_jumping = true; | 438 | m_jumping = true; |
@@ -465,6 +465,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
465 | m_jumping = true; | 465 | m_jumping = true; |
466 | return "JUMP"; | 466 | return "JUMP"; |
467 | } | 467 | } |
468 | return CurrentMovementAnimation; | ||
468 | } | 469 | } |
469 | 470 | ||
470 | #endregion Jumping | 471 | #endregion Jumping |
@@ -508,7 +509,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
508 | } | 509 | } |
509 | } | 510 | } |
510 | 511 | ||
511 | |||
512 | // next section moved outside paren. and realigned for jumping | 512 | // next section moved outside paren. and realigned for jumping |
513 | 513 | ||
514 | if (heldOnXY) | 514 | if (heldOnXY) |
@@ -530,12 +530,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
530 | return "WALK"; | 530 | return "WALK"; |
531 | } | 531 | } |
532 | } | 532 | } |
533 | else if (!m_jumping) | 533 | else |
534 | { | 534 | { |
535 | currentControlState = motionControlStates.onsurface; | 535 | currentControlState = motionControlStates.onsurface; |
536 | Falling = false; | 536 | Falling = false; |
537 | // Not walking | 537 | // Not walking |
538 | if(heldDown) | 538 | if (heldDown) |
539 | return "CROUCH"; | 539 | return "CROUCH"; |
540 | else if (heldTurnLeft) | 540 | else if (heldTurnLeft) |
541 | return "TURNLEFT"; | 541 | return "TURNLEFT"; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 6daa109..3fc741c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -666,6 +666,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
666 | m_isSelected = value; | 666 | m_isSelected = value; |
667 | if (ParentGroup != null) | 667 | if (ParentGroup != null) |
668 | ParentGroup.PartSelectChanged(value); | 668 | ParentGroup.PartSelectChanged(value); |
669 | if (!m_isSelected && m_angularVelocity != Vector3.Zero) | ||
670 | ScheduleTerseUpdate(); | ||
669 | } | 671 | } |
670 | } | 672 | } |
671 | 673 | ||
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index 992fae7..af7ca1d 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | |||
@@ -928,7 +928,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
928 | IsColliding = true; | 928 | IsColliding = true; |
929 | } | 929 | } |
930 | } | 930 | } |
931 | 931 | /* | |
932 | if (contact.normal.Z < 0.2f) | 932 | if (contact.normal.Z < 0.2f) |
933 | { | 933 | { |
934 | contact.normal.Z = 0; | 934 | contact.normal.Z = 0; |
@@ -940,12 +940,15 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
940 | contact.normal.Y *= t; | 940 | contact.normal.Y *= t; |
941 | } | 941 | } |
942 | } | 942 | } |
943 | */ | ||
943 | return true; | 944 | return true; |
944 | } | 945 | } |
945 | 946 | ||
946 | altContact = contact; | 947 | altContact = contact; |
947 | useAltcontact = true; | 948 | useAltcontact = true; |
948 | 949 | ||
950 | offset.Z -= 0.2f; | ||
951 | |||
949 | offset.Normalize(); | 952 | offset.Normalize(); |
950 | 953 | ||
951 | if (contact.depth > 0.1f) | 954 | if (contact.depth > 0.1f) |
@@ -1201,8 +1204,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1201 | // Avatar to Avatar collisions | 1204 | // Avatar to Avatar collisions |
1202 | // Prim to avatar collisions | 1205 | // Prim to avatar collisions |
1203 | 1206 | ||
1204 | vec.X = -vel.X * PID_D * 2 + (_zeroPosition.X - localpos.X) * (PID_P * 5); | 1207 | vec.X = -vel.X * PID_D + (_zeroPosition.X - localpos.X) * (PID_P * 5); |
1205 | vec.Y = -vel.Y * PID_D * 2 + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); | 1208 | vec.Y = -vel.Y * PID_D + (_zeroPosition.Y - localpos.Y) * (PID_P * 5); |
1206 | if (flying) | 1209 | if (flying) |
1207 | { | 1210 | { |
1208 | vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; | 1211 | vec.Z += -vel.Z * PID_D + (_zeroPosition.Z - localpos.Z) * PID_P; |
@@ -1223,7 +1226,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1223 | if (ctz.Z > 0f) | 1226 | if (ctz.Z > 0f) |
1224 | { | 1227 | { |
1225 | // moving up or JUMPING | 1228 | // moving up or JUMPING |
1226 | vec.Z += (ctz.Z - vel.Z) * PID_D * 1.2f;// +(_zeroPosition.Z - localpos.Z) * PID_P; | 1229 | vec.Z += (ctz.Z - vel.Z) * PID_D; |
1227 | vec.X += (ctz.X - vel.X) * (PID_D); | 1230 | vec.X += (ctz.X - vel.X) * (PID_D); |
1228 | vec.Y += (ctz.Y - vel.Y) * (PID_D); | 1231 | vec.Y += (ctz.Y - vel.Y) * (PID_D); |
1229 | } | 1232 | } |
@@ -1233,7 +1236,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1233 | if (ctz.Z == 0) | 1236 | if (ctz.Z == 0) |
1234 | { | 1237 | { |
1235 | if (vel.Z > 0) | 1238 | if (vel.Z > 0) |
1236 | vec.Z -= vel.Z * PID_D * 2.0f; | 1239 | vec.Z -= vel.Z * PID_D; |
1237 | vec.X += (ctz.X - vel.X) * (PID_D); | 1240 | vec.X += (ctz.X - vel.X) * (PID_D); |
1238 | vec.Y += (ctz.Y - vel.Y) * (PID_D); | 1241 | vec.Y += (ctz.Y - vel.Y) * (PID_D); |
1239 | } | 1242 | } |
@@ -1241,7 +1244,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1241 | else | 1244 | else |
1242 | { | 1245 | { |
1243 | if (ctz.Z < vel.Z) | 1246 | if (ctz.Z < vel.Z) |
1244 | vec.Z += (ctz.Z - vel.Z) * PID_D * 2.0f; | 1247 | vec.Z += (ctz.Z - vel.Z) * PID_D; |
1245 | else | 1248 | else |
1246 | { | 1249 | { |
1247 | } | 1250 | } |
@@ -1260,7 +1263,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1260 | // We're flying and colliding with something | 1263 | // We're flying and colliding with something |
1261 | vec.X += (ctz.X - vel.X) * (PID_D * 0.0625f); | 1264 | vec.X += (ctz.X - vel.X) * (PID_D * 0.0625f); |
1262 | vec.Y += (ctz.Y - vel.Y) * (PID_D * 0.0625f); | 1265 | vec.Y += (ctz.Y - vel.Y) * (PID_D * 0.0625f); |
1263 | vec.Z += (ctz.Z - vel.Z) * (PID_D); | 1266 | vec.Z += (ctz.Z - vel.Z) * (PID_D * 0.0625f); |
1264 | } | 1267 | } |
1265 | } | 1268 | } |
1266 | else // ie not colliding | 1269 | else // ie not colliding |
@@ -1268,8 +1271,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1268 | if (flying) //(!m_iscolliding && flying) | 1271 | if (flying) //(!m_iscolliding && flying) |
1269 | { | 1272 | { |
1270 | // we're in mid air suspended | 1273 | // we're in mid air suspended |
1271 | vec.X += (ctz.X - vel.X) * (PID_D * 1.667f); | 1274 | vec.X += (ctz.X - vel.X) * (PID_D); |
1272 | vec.Y += (ctz.Y - vel.Y) * (PID_D * 1.667f); | 1275 | vec.Y += (ctz.Y - vel.Y) * (PID_D); |
1273 | vec.Z += (ctz.Z - vel.Z) * (PID_D); | 1276 | vec.Z += (ctz.Z - vel.Z) * (PID_D); |
1274 | } | 1277 | } |
1275 | 1278 | ||