diff --git a/core/Makefile b/core/Makefile index e12a20de..25b6232a 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,7 +1,7 @@ #(C)2004-2006 SourceMM Development Team # Makefile written by David "BAILOPAN" Anderson -SMM_BASE = ../../../sourcemm +SMM_BASE = ../../sourcemm SMM_TRUNK = $(SMM_BASE)/trunk HL2SDK = $(SMM_BASE)/hl2sdk SMSDK = .. diff --git a/core/MenuManager.cpp b/core/MenuManager.cpp index 111d47ff..58f6214b 100644 --- a/core/MenuManager.cpp +++ b/core/MenuManager.cpp @@ -96,6 +96,8 @@ void VoteMenuHandler::DecrementPlayerCount() void VoteMenuHandler::EndVoting() { unsigned int chosen = 0; + size_t highest = 0; + unsigned int dup_count = 0; /* If we got zero votes, take a shortcut. */ if (m_NumVotes == 0) @@ -110,9 +112,7 @@ void VoteMenuHandler::EndVoting() * This is the max number of players. */ unsigned int dup_array[256]; - unsigned int dup_count = 0; - size_t highest = 0; for (size_t i=1; i m_Votes[highest]) diff --git a/core/MenuStyle_Base.cpp b/core/MenuStyle_Base.cpp index 0da6cf92..28ae0d0e 100644 --- a/core/MenuStyle_Base.cpp +++ b/core/MenuStyle_Base.cpp @@ -669,4 +669,7 @@ bool CBaseMenu::BroadcastVote(int clients[], } m_pVoteHandler->StartVoting(); + + return true; } + diff --git a/core/smn_menus.cpp b/core/smn_menus.cpp index d38d9a46..03ac49d2 100644 --- a/core/smn_menus.cpp +++ b/core/smn_menus.cpp @@ -393,7 +393,7 @@ static cell_t VoteMenu(IPluginContext *pContext, const cell_t *params) cell_t *addr; pContext->LocalToPhysAddr(params[2], &addr); - return menu->BroadcastVote(addr, params[3], params[4]); + return menu->BroadcastVote(addr, params[3], params[4]) ? 1 : 0; } static cell_t AddMenuItem(IPluginContext *pContext, const cell_t *params)