fixed linux build

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40885
This commit is contained in:
David Anderson
2007-06-05 17:21:47 +00:00
parent 2ee18824e9
commit a290cf6c1b
4 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -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 = ..
+2 -2
View File
@@ -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.size(); i++)
{
if (m_Votes[i] > m_Votes[highest])
+3
View File
@@ -669,4 +669,7 @@ bool CBaseMenu::BroadcastVote(int clients[],
}
m_pVoteHandler->StartVoting();
return true;
}
+1 -1
View File
@@ -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)