diff --git a/src/kz/mode/kz_mode_ckz.cpp b/src/kz/mode/kz_mode_ckz.cpp index eb95fa82..f1614a30 100644 --- a/src/kz/mode/kz_mode_ckz.cpp +++ b/src/kz/mode/kz_mode_ckz.cpp @@ -539,9 +539,8 @@ void KZClassicModeService::CalcPrestrafe() punishRate = g_pKZUtils->GetGlobals()->frametime * PS_DECREMENT_RATIO; } - if (this->player->GetPlayerPawn()->m_fFlags & FL_ONGROUND && this->player->oldWalkMoved) + if (this->player->GetPlayerPawn()->m_fFlags & FL_ONGROUND) { -#ifdef NO_CROUCH_PRE // Prevent instant full pre from crouched prestrafe. Vector velocity; this->player->GetVelocity(&velocity); @@ -555,18 +554,15 @@ void KZClassicModeService::CalcPrestrafe() { currentPreRatio = pow(this->bonusSpeed / PS_SPEED_MAX * SPEED_NORMAL / velocity.Length2D(), 1 / PS_RATIO_TO_SPEED) * PS_MAX_PS_TIME; } + this->leftPreRatio = MIN(this->leftPreRatio, currentPreRatio); this->rightPreRatio = MIN(this->rightPreRatio, currentPreRatio); -#endif - this->leftPreRatio += averageRate > PS_MIN_REWARD_RATE ? rewardRate : -punishRate; this->rightPreRatio += averageRate < -PS_MIN_REWARD_RATE ? rewardRate : -punishRate; this->leftPreRatio = Clamp(leftPreRatio, 0.0f, PS_MAX_PS_TIME); this->rightPreRatio = Clamp(rightPreRatio, 0.0f, PS_MAX_PS_TIME); -#ifdef NO_CROUCH_PRE this->bonusSpeed = this->GetPrestrafeGain() / SPEED_NORMAL * velocity.Length2D(); -#endif } else {