fixed linux build
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40885
This commit is contained in:
parent
2ee18824e9
commit
a290cf6c1b
@ -1,7 +1,7 @@
|
|||||||
#(C)2004-2006 SourceMM Development Team
|
#(C)2004-2006 SourceMM Development Team
|
||||||
# Makefile written by David "BAILOPAN" Anderson
|
# Makefile written by David "BAILOPAN" Anderson
|
||||||
|
|
||||||
SMM_BASE = ../../../sourcemm
|
SMM_BASE = ../../sourcemm
|
||||||
SMM_TRUNK = $(SMM_BASE)/trunk
|
SMM_TRUNK = $(SMM_BASE)/trunk
|
||||||
HL2SDK = $(SMM_BASE)/hl2sdk
|
HL2SDK = $(SMM_BASE)/hl2sdk
|
||||||
SMSDK = ..
|
SMSDK = ..
|
||||||
|
@ -96,6 +96,8 @@ void VoteMenuHandler::DecrementPlayerCount()
|
|||||||
void VoteMenuHandler::EndVoting()
|
void VoteMenuHandler::EndVoting()
|
||||||
{
|
{
|
||||||
unsigned int chosen = 0;
|
unsigned int chosen = 0;
|
||||||
|
size_t highest = 0;
|
||||||
|
unsigned int dup_count = 0;
|
||||||
|
|
||||||
/* If we got zero votes, take a shortcut. */
|
/* If we got zero votes, take a shortcut. */
|
||||||
if (m_NumVotes == 0)
|
if (m_NumVotes == 0)
|
||||||
@ -110,9 +112,7 @@ void VoteMenuHandler::EndVoting()
|
|||||||
* This is the max number of players.
|
* This is the max number of players.
|
||||||
*/
|
*/
|
||||||
unsigned int dup_array[256];
|
unsigned int dup_array[256];
|
||||||
unsigned int dup_count = 0;
|
|
||||||
|
|
||||||
size_t highest = 0;
|
|
||||||
for (size_t i=1; i<m_Votes.size(); i++)
|
for (size_t i=1; i<m_Votes.size(); i++)
|
||||||
{
|
{
|
||||||
if (m_Votes[i] > m_Votes[highest])
|
if (m_Votes[i] > m_Votes[highest])
|
||||||
|
@ -669,4 +669,7 @@ bool CBaseMenu::BroadcastVote(int clients[],
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_pVoteHandler->StartVoting();
|
m_pVoteHandler->StartVoting();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,7 +393,7 @@ static cell_t VoteMenu(IPluginContext *pContext, const cell_t *params)
|
|||||||
cell_t *addr;
|
cell_t *addr;
|
||||||
pContext->LocalToPhysAddr(params[2], &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)
|
static cell_t AddMenuItem(IPluginContext *pContext, const cell_t *params)
|
||||||
|
Loading…
Reference in New Issue
Block a user