diff --git a/Assets/Scripts/Behaviours/Ped/States/RollState.cs b/Assets/Scripts/Behaviours/Ped/States/RollState.cs index fa9353189..7a00fa39c 100644 --- a/Assets/Scripts/Behaviours/Ped/States/RollState.cs +++ b/Assets/Scripts/Behaviours/Ped/States/RollState.cs @@ -84,7 +84,10 @@ void OnDictChanged(Ped.SyncDictionaryStringUint.Operation op, string key, uint v // break; // } - Debug.LogFormat("OnDictChanged() - op: {0}, key: {1}, value: {2}", op, key, value); + //Debug.LogFormat("OnDictChanged() - op: {0}, key: {1}, value: {2}", op, key, value); + + if (!this.IsActiveState) + return; if (key != kRollDirSyncName) return; @@ -93,11 +96,10 @@ void OnDictChanged(Ped.SyncDictionaryStringUint.Operation op, string key, uint v if (m_ped.syncDictionaryStringUint.ContainsKey(key)) { // roll direction possibly changed - bool oldLeft = m_rollLeft; m_rollLeft = m_ped.syncDictionaryStringUint[key] == 1; - Debug.LogFormat("roll dir changed - old left: {0}, new left: {1}", oldLeft, m_rollLeft); - if (oldLeft != m_rollLeft) - this.PlayAnim(); + //Debug.LogFormat("roll dir changed - old left: {0}, new left: {1}", oldLeft, m_rollLeft); + this.PlayAnim(); + m_animState.time = 0f; } }); @@ -150,7 +152,7 @@ void PlayAnim() // clients have wrap mode set to 'Loop', because state can be switched very fast between roll and crouchaim, and // server will not update current state syncvar, so client will not start the state again, // and roll state will remain - m_animState.wrapMode = m_isServer ? WrapMode.Once : WrapMode.Loop; + m_animState.wrapMode = WrapMode.Once; m_model.VelocityAxis = 0; // movement will be done along x axis } diff --git a/Docs/TODO.md b/Docs/TODO.md index bab1808fa..38edfd03a 100644 --- a/Docs/TODO.md +++ b/Docs/TODO.md @@ -20,12 +20,6 @@ - Does 'O' button changes quality level ? -- Client can't enter vehicle state - print additional state data ; - -- Ped runs through ground when playing run-aim anim with mp5, ak47, etc... when holding gun with 2 hands - -- Rolling: when doing more rolls in a sequence, roll direction can change, and client only uses the original direction - - Play sounds: horn ; empty weapon slot ; ped damage ; footsteps in run and sprint states ; - Script execution order: HUD before pause menu and windows ; fps counter after all ;