fixed check so admin nominate still works
This commit is contained in:
parent
e74db611c4
commit
e2659d79a6
@ -2211,22 +2211,25 @@ NominateResult InternalNominateMap(char[] map, int owner)
|
|||||||
/* Look to replace an existing nomination by this client - Nominations made with owner = 0 arent replaced */
|
/* Look to replace an existing nomination by this client - Nominations made with owner = 0 arent replaced */
|
||||||
//2023 edit: change clients first nomination out of the clients multiple nominations, make a check if client filled all his nomination slots
|
//2023 edit: change clients first nomination out of the clients multiple nominations, make a check if client filled all his nomination slots
|
||||||
//2026 edit: using tier to determine if 3 nominations or just 1
|
//2026 edit: using tier to determine if 3 nominations or just 1
|
||||||
int tier_required = GetConVarInt(g_Cvar_MultipleNominationsTier);
|
if (owner)
|
||||||
int client_tier = GetPlayerTier_native(owner);
|
|
||||||
int nom_capacity = tier_required > client_tier ? 0 : 2; //1 nomination or 3 nominations.
|
|
||||||
|
|
||||||
if(owner && GetArraySize(g_NominateList[owner]) > nom_capacity)
|
|
||||||
{
|
{
|
||||||
char oldmap[PLATFORM_MAX_PATH];
|
int tier_required = GetConVarInt(g_Cvar_MultipleNominationsTier);
|
||||||
GetArrayString(g_NominateList[owner], 0, oldmap, PLATFORM_MAX_PATH);
|
int client_tier = GetPlayerTier_native(owner);
|
||||||
Call_StartForward(g_NominationsResetForward);
|
int nom_capacity = tier_required > client_tier ? 0 : 2; //1 nomination or 3 nominations.
|
||||||
Call_PushString(oldmap);
|
|
||||||
Call_PushCell(owner);
|
|
||||||
Call_Finish();
|
|
||||||
|
|
||||||
RemoveFromArray(g_NominateList[owner], 0);
|
if(GetArraySize(g_NominateList[owner]) > nom_capacity)
|
||||||
PushArrayString(g_NominateList[owner], map);
|
{
|
||||||
return Nominate_Replaced;
|
char oldmap[PLATFORM_MAX_PATH];
|
||||||
|
GetArrayString(g_NominateList[owner], 0, oldmap, PLATFORM_MAX_PATH);
|
||||||
|
Call_StartForward(g_NominationsResetForward);
|
||||||
|
Call_PushString(oldmap);
|
||||||
|
Call_PushCell(owner);
|
||||||
|
Call_Finish();
|
||||||
|
|
||||||
|
RemoveFromArray(g_NominateList[owner], 0);
|
||||||
|
PushArrayString(g_NominateList[owner], map);
|
||||||
|
return Nominate_Replaced;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (owner != 0 && g_NominateList[owner] != INVALID_HANDLE)
|
if (owner != 0 && g_NominateList[owner] != INVALID_HANDLE)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user