Maps nominated by owner=0 should not be replaced. Fixes sm_nominate_addmap only allowing a single map to be added (bug 3272)

This commit is contained in:
Matt Woodrow 2008-10-08 21:02:01 +13:00
parent db5a0be4ca
commit 759c76e188

View File

@ -884,7 +884,8 @@ NominateResult:InternalNominateMap(String:map[], bool:force, owner)
new index; new index;
if ((index = FindValueInArray(g_NominateOwners, owner)) != -1) /* Look to replace an existing nomination by this client - Nominations made with owner = 0 aren't replaced */
if (owner && ((index = FindValueInArray(g_NominateOwners, owner)) != -1))
{ {
new String:oldmap[33]; new String:oldmap[33];
GetArrayString(g_NominateList, index, oldmap, sizeof(oldmap)); GetArrayString(g_NominateList, index, oldmap, sizeof(oldmap));
@ -893,7 +894,6 @@ NominateResult:InternalNominateMap(String:map[], bool:force, owner)
Call_PushCell(owner); Call_PushCell(owner);
Call_Finish(); Call_Finish();
SetArrayString(g_NominateList, index, map); SetArrayString(g_NominateList, index, map);
return Nominate_Replaced; return Nominate_Replaced;
} }