cleaned up menu vote code a bit

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401600
This commit is contained in:
David Anderson
2007-10-16 19:28:02 +00:00
parent f0dc4e996f
commit 54febbbc48
9 changed files with 28 additions and 8 deletions
+18
View File
@@ -731,3 +731,21 @@ stock GetMenuVoteInfo(param2, &winningVotes, &totalVotes)
winningVotes = param2 & 0xFFFF;
totalVotes = param2 >> 16;
}
/**
* Quick stock to determine whether voting is allowed. This doesn't let you
* fine-tune a reason for not voting, so it's not recommended for lazily
* telling clients that voting isn't allowed.
*
* @return True if voting is allowed, false if voting is in progress
* or the cooldown is active.
*/
stock bool:IsNewVoteAllowed()
{
if (IsVoteInProgress() || CheckVoteDelay() != 0)
{
return false;
}
return true;
}