changing map chooser again to use numbers of votes instead of percentages

This commit is contained in:
2025-02-23 13:15:52 +01:00
parent dcbfe513d5
commit 239d53c57b
5 changed files with 94 additions and 228 deletions
@@ -169,7 +169,6 @@ public void sql_select_hiding_unavailable_maps(int client)
char query[255];
char steam_auth[64];
GetClientAuthId(client, AuthId_Steam2, steam_auth, sizeof(steam_auth));
//we have way too many dbs, just adding this to unloze_race_timer
Format(query, sizeof(query), "SELECT is_ignoring FROM `mapchooser_hide_unavailable` where steam_auth = '%s'", steam_auth);
g_dDatabase.Query(SQL_OnQueryCompleted_ignoring, query, GetClientSerial(client));
}
@@ -501,7 +500,7 @@ public Action Command_Removemap(int client, int args)
GetCmdArg(1, mapname, sizeof(mapname));
// int status;
if(/*!GetTrieValue(g_mapTrie, mapname, status)*/!IsMapValid(mapname))
if(!IsMapValid(mapname))
{
CReplyToCommand(client, "%t", "Map was not found", mapname);
AttemptAdminRemoveMap(client, mapname);
@@ -669,7 +668,6 @@ public Action Command_Nominate(int client, int args)
static char mapname[PLATFORM_MAX_PATH];
GetCmdArg(1, mapname, sizeof(mapname));
int status;
if(!GetTrieValue(g_mapTrie, mapname, status))
{
@@ -773,11 +771,7 @@ public Action Command_Nominate(int client, int args)
if(result == Nominate_Added)
{
int nominate_worth = RoundToFloor(GetPlayerWorthRTV_boost_(client));
if (nominate_worth < 1)
{
nominate_worth = 1;
}
int nominate_worth = GetPlayerWorthRTV_boost_(client);
PrintToChatAll("[NE] %t", "Map Nominated", name, mapname, nominate_worth);
}
else if(result == Nominate_Replaced)
@@ -850,12 +844,7 @@ void AttemptNominate(int client, const char[] filter = "")
Menu menu = g_MapMenu;
menu = BuildMapMenu(filter, client);
GetPlayerWorthRTV_(client);
int nominate_worth = RoundToFloor(GetPlayerWorthRTV_boost_(client));
if (nominate_worth < 1)
{
nominate_worth = 1;
}
int nominate_worth = GetPlayerWorthRTV_boost_(client);
SetMenuTitle(menu, "%T", "Nominate Title", client, nominate_worth);
DisplayMenu(menu, client, MENU_TIME_FOREVER);
}
@@ -946,11 +935,8 @@ bool PopulateNominateListMenu(Menu menu, int client, const char[] filter = "")
}
else
{
int nominate_worth = RoundToFloor(GetPlayerWorthRTV_boost_(owner));
if (nominate_worth < 1)
{
nominate_worth = 1;
}
int nominate_worth = GetPlayerWorthRTV_boost_(owner);
//atm everybody just has equal voting again, so this is just += 1
nominate_count_for_particular_map += nominate_worth;
}
sm.SetValue(map, nominate_count_for_particular_map, true);
@@ -1207,11 +1193,7 @@ public int Handler_MapSelectMenu(Menu menu, MenuAction action, int param1, int p
if(result == Nominate_Added)
{
int nominate_worth = RoundToFloor(GetPlayerWorthRTV_boost_(param1));
if (nominate_worth < 1)
{
nominate_worth = 1;
}
int nominate_worth = GetPlayerWorthRTV_boost_(param1);
PrintToChatAll("[NE] %t", "Map Nominated", name, map, nominate_worth);
}
else if(result == Nominate_Replaced)