From 9158cb6f3252a5620176a33a34812b2b0153700c Mon Sep 17 00:00:00 2001 From: jenz Date: Thu, 19 Sep 2024 18:59:28 +0200 Subject: [PATCH] fixed boundarie issues that only happen when alone --- mapchooser_extended/scripting/rockthevote_extended_avg.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapchooser_extended/scripting/rockthevote_extended_avg.sp b/mapchooser_extended/scripting/rockthevote_extended_avg.sp index 90999a9d..ae1ca1e8 100755 --- a/mapchooser_extended/scripting/rockthevote_extended_avg.sp +++ b/mapchooser_extended/scripting/rockthevote_extended_avg.sp @@ -363,12 +363,12 @@ void AttemptRTV(int client) g_VotesNeeded = Votes; } int rtv_percentage_reached = RoundToFloor((float(Votes) / float(g_VotesNeeded)) * 100); - if (rtv_percentage_reached > 100) + if (rtv_percentage_reached > 100 || rtv_percentage_reached < 0) { rtv_percentage_reached = 100; } int clients_percentage = RoundToFloor((GetPlayerWorthRTV_(client) / float(g_VotesNeeded)) * 100); - if (clients_percentage > 100) + if (clients_percentage > 100 || clients_percentage < 0) { clients_percentage = 100; }