removed unnecesary parameter, not sure if map being incorrect parameter type is fixed doe

This commit is contained in:
jenz 2023-03-23 22:25:20 +01:00
parent 5840846119
commit e094ed41aa
2 changed files with 12 additions and 29 deletions

View File

@ -230,7 +230,6 @@ public void OnPluginEnd()
Call_StartForward(g_NominationsResetForward);
GetArrayString(g_NominateList[i], j, oldmap, PLATFORM_MAX_PATH);
Call_PushString(oldmap);
Call_PushCell(GetArrayCell(g_NominateOwners, index));
Call_Finish();
}
}
@ -622,7 +621,6 @@ public void OnClientDisconnect(int client)
char oldmap[PLATFORM_MAX_PATH];
GetArrayString(g_NominateList[client], i, oldmap, PLATFORM_MAX_PATH);
Call_PushString(oldmap);
Call_PushCell(GetArrayCell(g_NominateOwners, index));
Call_Finish();
}
@ -1242,14 +1240,9 @@ void InitiateVote(MapChange when, Handle inputlist=INVALID_HANDLE)
RemoveStringFromArray(g_NextMapList, map);
/* Notify Nominations that this map is now free */
//2023-03-23 edit to prevent index going out of range
if (GetArraySize(g_NominateOwners) > i)
{
Call_StartForward(g_NominationsResetForward);
Call_PushString(map);
Call_PushCell(GetArrayCell(g_NominateOwners, i));
Call_Finish();
}
Call_StartForward(g_NominationsResetForward);
Call_PushString(map);
Call_Finish();
}
/* Clear out the rest of the nominations array */
@ -1260,14 +1253,9 @@ void InitiateVote(MapChange when, Handle inputlist=INVALID_HANDLE)
/* These maps shouldn't be excluded from the vote as they weren't really nominated at all */
/* Notify Nominations that this map is now free */
//2023-03-23 edit to prevent index going out of range
if (GetArraySize(g_NominateOwners) > i)
{
Call_StartForward(g_NominationsResetForward);
Call_PushString(map);
Call_PushCell(GetArrayCell(g_NominateOwners, i));
Call_Finish();
}
Call_StartForward(g_NominationsResetForward);
Call_PushString(map);
Call_Finish();
}
/* There should currently be 'nominationsToAdd' unique maps in the vote */
@ -1845,7 +1833,6 @@ NominateResult InternalNominateMap(char[] map, int owner)
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);
@ -1890,7 +1877,6 @@ NominateResult InternalNominateMap(char[] map, int owner)
Call_StartForward(g_NominationsResetForward);
Call_PushString(oldmap);
int owner_ = GetArrayCell(g_NominateOwners, 0);
Call_PushCell(owner_);
Call_Finish();
RemoveFromArray(g_NominateList[owner], 0);
@ -1934,7 +1920,6 @@ bool InternalRemoveNominationByMap(char[] map)
{
Call_StartForward(g_NominationsResetForward);
Call_PushString(oldmap);
Call_PushCell(GetArrayCell(g_NominateOwners, i));
Call_Finish();
int owner = GetArrayCell(g_NominateOwners, i);
@ -1979,7 +1964,6 @@ bool InternalRemoveNominationByOwner(int owner)
Call_StartForward(g_NominationsResetForward);
Call_PushString(oldmap);
Call_PushCell(owner);
Call_Finish();
RemoveFromArray(g_NominateList[owner], index);
@ -2628,17 +2612,16 @@ void CheckMapRestrictions(bool time = false, bool players = false)
if (remove)
{
if (GetArraySize(g_NominateOwners) > i)
if (strlen(map) > 0)
{
Call_StartForward(g_NominationsResetForward);
Call_PushString(map);
Call_PushCell(GetArrayCell(g_NominateOwners, i));
Call_Finish();
RemoveFromArray(g_NominateList[client], i);
RemoveFromArray(g_NominateOwners, i);
g_NominateCount--;
}
RemoveFromArray(g_NominateList[client], i);
RemoveFromArray(g_NominateOwners, i);
g_NominateCount--;
}
}
}

View File

@ -234,7 +234,7 @@ void UpdateMapTrie()
delete excludeMaps;
}
public void OnNominationRemoved(const char[] map, int owner)
public void OnNominationRemoved(const char[] map)
{
int status;
/* Is the map in our list? */