From 3713304d0d1142173f38abf1c7caa02df4e4f775 Mon Sep 17 00:00:00 2001 From: jenz Date: Sat, 20 Jan 2024 17:46:23 +0100 Subject: [PATCH] fixed client index being incorrect --- .../scripting/mapchooser_extended_avg.sp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mapchooser_extended/scripting/mapchooser_extended_avg.sp b/mapchooser_extended/scripting/mapchooser_extended_avg.sp index 8ad1fd3e..63e7ef99 100755 --- a/mapchooser_extended/scripting/mapchooser_extended_avg.sp +++ b/mapchooser_extended/scripting/mapchooser_extended_avg.sp @@ -1068,18 +1068,21 @@ public Handle get_most_nominated_maps() int nominate_count_for_particular_map = 0; sm.GetValue(map_iteration, nominate_count_for_particular_map); - int nominate_worth = RoundToFloor(GetPlayerWorthRTV_boost_(i)); - if (nominate_worth < 1) - { - nominate_worth = 1; - } - nominate_count_for_particular_map += nominate_worth; //if i is 0 its admin nominated map that must come into the vote. //if strequal the map was nominated by a leader and most be forced on the vote. if(!i || StrEqual(map_iteration, MapleaderNominatedMap, false)) { nominate_count_for_particular_map = 999; } + else + { + int nominate_worth = RoundToFloor(GetPlayerWorthRTV_boost_(i)); + if (nominate_worth < 1) + { + nominate_worth = 1; + } + nominate_count_for_particular_map += nominate_worth; + } sm.SetValue(map_iteration, nominate_count_for_particular_map, true); /* Notify Nominations that this map is now free */