From 759c76e1883aea417f6825d46f257dd9d71c1ce8 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Wed, 8 Oct 2008 21:02:01 +1300 Subject: [PATCH] Maps nominated by owner=0 should not be replaced. Fixes sm_nominate_addmap only allowing a single map to be added (bug 3272) --- plugins/mapchooser.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mapchooser.sp b/plugins/mapchooser.sp index 743e557c..9f7b72f0 100644 --- a/plugins/mapchooser.sp +++ b/plugins/mapchooser.sp @@ -884,7 +884,8 @@ NominateResult:InternalNominateMap(String:map[], bool:force, owner) 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]; GetArrayString(g_NominateList, index, oldmap, sizeof(oldmap)); @@ -893,7 +894,6 @@ NominateResult:InternalNominateMap(String:map[], bool:force, owner) Call_PushCell(owner); Call_Finish(); - SetArrayString(g_NominateList, index, map); return Nominate_Replaced; }