View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-08-2012 , 15:41   Re: MapChooser Extended 1.8.2 (Updated 2012-01-31)
Reply With Quote #330

Quote:
Originally Posted by napalm00 View Post
It might just be me being a complete noob and missing a cvar setting, but could a cvar for preventing the map vote to happen if sm_setnextmap is used be added? Would be rather useful as it often happens that admins want to play a fun map that isn't included in the map cycle and the vote pops up after they've set it and denies their actions with a big trollface.
I was under the impression that the map vote was supposed to be skipped when sm_setnextmap was used. It's probably a bug. I'll look into it.

Edit: At a guess, the bug is this line:
PHP Code:
    if (g_MapVoteCompleted && g_ChangeMapInProgress
which should actually be
PHP Code:
    if (g_MapVoteCompleted || g_ChangeMapInProgress
Edit 2: Nope, it's this line:
PHP Code:
    if (!GetArraySize(g_MapList) || (when == MapChange_MapEnd && (!GetConVarBool(g_Cvar_EndOfMapVote) || g_MapVoteCompleted)) || g_HasVoteStarted
I'll figure out the best way to change it. It was formerly
PHP Code:
    if (!GetArraySize(g_MapList) || !GetConVarBool(g_Cvar_EndOfMapVote) || g_MapVoteCompleted || g_HasVoteStarted
but was changed because of revotes.

Edit 3: Changed the order of parentheses. This should work because g_MapVoteCompleted isn't set before revotes:
PHP Code:
    if (!GetArraySize(g_MapList) || (when == MapChange_MapEnd && !GetConVarBool(g_Cvar_EndOfMapVote)) || g_MapVoteCompleted || g_HasVoteStarted
This fix will be pushed out with 1.9.0.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 05-08-2012 at 16:00. Reason: skipped, not skipping. Brain went on vacation for a moment.
Powerlord is offline