Skip to content

Commit

Permalink
Add restriction of the CVar value
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Shorokhov committed Nov 24, 2022
1 parent 4064e23 commit 3cb47fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regamedll/dlls/multiplay_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ bool CHalfLifeMultiplay::HostageRescueRoundEndCheck()
}

#ifdef REGAMEDLL_ADD
if (hostagesCount > 0 && m_iHostagesRescued >= (hostagesCount * hostages_rescued_ratio.value))
if (hostagesCount > 0 && m_iHostagesRescued >= (hostagesCount * Q_min(hostages_rescued_ratio.value, 1.0f)))
{
return OnRoundEnd_Intercept(WINSTATUS_CTS, ROUND_ALL_HOSTAGES_RESCUED, GetRoundRestartDelay());
}
Expand Down

0 comments on commit 3cb47fa

Please sign in to comment.