From a290cf6c1b779007df9c11f8a41478ab0f94ff71 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 5 Jun 2007 17:21:47 +0000 Subject: [PATCH] fixed linux build --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40885 --- core/Makefile | 2 +- core/MenuManager.cpp | 4 ++-- core/MenuStyle_Base.cpp | 3 +++ core/smn_menus.cpp | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/Makefile b/core/Makefile index e12a20deb..25b6232ac 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 111d47ff6..58f6214b9 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 0da6cf92a..28ae0d0e9 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 d38d9a46b..03ac49d21 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)