diff options
author | Melanie | 2011-10-21 03:15:56 +0200 |
---|---|---|
committer | Melanie | 2011-10-21 03:15:56 +0200 |
commit | 8cca9fe23cd2b8d785e844d123e3c565efc23e97 (patch) | |
tree | 1757663f6f06f86191c2b19455e11d70a89ad6e9 /OpenSim/Region/Framework | |
parent | Fix up the animator and ScenePresence to like each other again (diff) | |
download | opensim-SC_OLD-8cca9fe23cd2b8d785e844d123e3c565efc23e97.zip opensim-SC_OLD-8cca9fe23cd2b8d785e844d123e3c565efc23e97.tar.gz opensim-SC_OLD-8cca9fe23cd2b8d785e844d123e3c565efc23e97.tar.bz2 opensim-SC_OLD-8cca9fe23cd2b8d785e844d123e3c565efc23e97.tar.xz |
Allow updating the movement animation while flying. This fixes falling,
splatting and ground sit. Walking to a ground sit still doesn't work.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1f39c3f..9884acd 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -187,7 +187,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
187 | protected ulong crossingFromRegion; | 187 | protected ulong crossingFromRegion; |
188 | 188 | ||
189 | private readonly Vector3[] Dir_Vectors = new Vector3[11]; | 189 | private readonly Vector3[] Dir_Vectors = new Vector3[11]; |
190 | private bool m_isNudging = false; | ||
191 | 190 | ||
192 | 191 | ||
193 | protected Timer m_reprioritization_timer; | 192 | protected Timer m_reprioritization_timer; |
@@ -903,24 +902,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
903 | return vector; | 902 | return vector; |
904 | } | 903 | } |
905 | 904 | ||
906 | private bool[] GetDirectionIsNudge() | ||
907 | { | ||
908 | bool[] isNudge = new bool[11]; | ||
909 | isNudge[0] = false; //FORWARD | ||
910 | isNudge[1] = false; //BACK | ||
911 | isNudge[2] = false; //LEFT | ||
912 | isNudge[3] = false; //RIGHT | ||
913 | isNudge[4] = false; //UP | ||
914 | isNudge[5] = false; //DOWN | ||
915 | isNudge[6] = true; //FORWARD_NUDGE | ||
916 | isNudge[7] = true; //BACK_NUDGE | ||
917 | isNudge[8] = true; //LEFT_NUDGE | ||
918 | isNudge[9] = true; //RIGHT_NUDGE | ||
919 | isNudge[10] = true; //DOWN_Nudge | ||
920 | return isNudge; | ||
921 | } | ||
922 | |||
923 | |||
924 | #endregion | 905 | #endregion |
925 | 906 | ||
926 | public uint GenerateClientFlags(UUID ObjectID) | 907 | public uint GenerateClientFlags(UUID ObjectID) |
@@ -1535,6 +1516,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1535 | 1516 | ||
1536 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0) | 1517 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) != 0) |
1537 | { | 1518 | { |
1519 | m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick. | ||
1520 | Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); | ||
1521 | |||
1538 | // TODO: This doesn't prevent the user from walking yet. | 1522 | // TODO: This doesn't prevent the user from walking yet. |
1539 | // Setting parent ID would fix this, if we knew what value | 1523 | // Setting parent ID would fix this, if we knew what value |
1540 | // to use. Or we could add a m_isSitting variable. | 1524 | // to use. Or we could add a m_isSitting variable. |
@@ -3736,7 +3720,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3736 | 3720 | ||
3737 | CollisionPlane = Vector4.UnitW; | 3721 | CollisionPlane = Vector4.UnitW; |
3738 | 3722 | ||
3739 | if (m_lastColCount != coldata.Count) | 3723 | // No collisions at all means we may be flying. Update always |
3724 | // to make falling work | ||
3725 | if (m_lastColCount != coldata.Count || coldata.Count == 0) | ||
3740 | { | 3726 | { |
3741 | m_updateCount = UPDATE_COUNT; | 3727 | m_updateCount = UPDATE_COUNT; |
3742 | m_lastColCount = coldata.Count; | 3728 | m_lastColCount = coldata.Count; |