From 84f8312b8666b2774eafbbb0e6d034ba598fd69c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 17 May 2020 20:36:48 +0300 Subject: Weapon fixes and thingies --- src/peds/PlayerPed.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/peds/PlayerPed.cpp') diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 826cc9e9..69a6d211 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -451,7 +451,7 @@ CPlayerPed::SetRealMoveAnim(void) } else if (curSprintAssoc->blendDelta >= 0.0f || curSprintAssoc->blendAmount >= 0.8f) { if (m_fMoveSpeed < 0.4f) { AnimationId runStopAnim; - if (curSprintAssoc->currentTime / curSprintAssoc->hierarchy->totalLength < 0.5) // double + if (curSprintAssoc->GetProgress() < 0.5) // double runStopAnim = ANIM_RUN_STOP; else runStopAnim = ANIM_RUN_STOP_R; @@ -638,7 +638,7 @@ CPlayerPed::PlayerControlSniper(CPad *padUsed) firePos = GetMatrix() * firePos; GetWeapon()->Fire(this, &firePos); } - GetWeapon()->Update(m_audioEntityId); + GetWeapon()->Update(m_audioEntityId, nil); } // --MIAMI: Made compatible with slots, but still TODO @@ -742,7 +742,7 @@ CPlayerPed::PlayerControlM16(CPad *padUsed) firePos = GetMatrix() * firePos; GetWeapon()->Fire(this, &firePos); } - GetWeapon()->Update(m_audioEntityId); + GetWeapon()->Update(m_audioEntityId, nil); } void @@ -1561,7 +1561,7 @@ CPlayerPed::ProcessControl(void) } if (padUsed && IsPedShootable()) { ProcessWeaponSwitch(padUsed); - GetWeapon()->Update(m_audioEntityId); + GetWeapon()->Update(m_audioEntityId, this); } ProcessAnimGroups(); if (padUsed) { -- cgit v1.2.3