Skip to content

mapchooser: Fix previous map exclusion bug#1197

Merged
KyleSanderson merged 1 commit intoalliedmodders:masterfrom
stickz:patch-5
Jul 9, 2020
Merged

mapchooser: Fix previous map exclusion bug#1197
KyleSanderson merged 1 commit intoalliedmodders:masterfrom
stickz:patch-5

Conversation

@stickz
Copy link
Contributor

@stickz stickz commented Mar 1, 2020

This commit fixes a bug where if the value of sm_mapvote_exclude is reduced, the change may not take effect for an extended period of time. The size of the old map list is not updated when this happens.

This commit fixes a bug where if the value of `sm_mapvote_exclude` is reduced, the change may not take effect right away.
@KyleSanderson KyleSanderson merged commit 287628b into alliedmodders:master Jul 9, 2020
@KyleSanderson
Copy link
Member

Interesting catch, thanks!

while (g_OldMapList.Length > g_Cvar_ExcludeMaps.IntValue)
{
g_OldMapList.Erase(0);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better do something like this?

if ( g_OldMapList.Length > g_Cvar_ExcludeMaps.IntValue )
{
	g_OldMapList.Resize( Cvar_ExcludeMaps.IntValue );
}	

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants