-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Copying the issue from the head repo since it was removed:
Describe the bug
When someone creates a change map vote that is set to end outside the bounds of the current map timelimit (map will change before it is over), the vote will always pass.
To Reproduce
Steps to reproduce the behavior:
Config:
"Changelevel"
{
"type" "map"
"vote" "1"
"ratio" "0.65"
"cooldown" "420"
"maxcalls" "1"
"recentmaps" "0"
"currentmap" "1"
"multiple" "0"
"override" ""
"command" "sm_map {MAP_NAME}"
"maplist" "default"
"start_notify" "A vote has been started to change level to {MAP_NAME}."
"pass_notify" "Vote passed, map changing to {MAP_NAME}"
"fail_notify" "Vote failed, current map remains! Received: {VOTE_AMOUNT} Required: {VOTE_REQUIRED}"
"chattrigger" "changelevel"
}
Wait until there are 10 seconds left until map end, initiate a vote. Map changes to initially voted next map, then immediately changes to custom voted map.
Expected behavior
If map vote ends after map ends, it should fail instead of passing without the required votes. This has started happening frequently now that this exploit has been found, sometimes players calling votes as soon as 2 seconds prior to map change to ensure they get the map they want.
Screenshots
N/A
Game Server
- Sourcemod version 1.10-6380 & 1.9-6275
- Metamod version 1.10.7-dev git 968
- Game CS:GO
Additional context
Some logging:
L 01/30/2019 - 20:31:13: [mapchooser_extended.smx] Voting for next map has finished. Nextmap: surf_akai_final_fix.
L 01/30/2019 - 20:35:13: [SM] Changed map to "surf_akai_final_fix"
L 01/30/2019 - 20:35:14: -------- Mapchange to surf_akai_final_fix --------
L 01/30/2019 - 20:35:14: [basecommands.smx] "Console<0><Console><Console>" changed map to "surf_delusional_"
L 01/30/2019 - 20:35:14: [mapchooser_extended.smx] Loaded map list for csgo.
L 01/30/2019 - 20:35:18: [SM] Changed map to "surf_delusional_"
L 01/30/2019 - 20:35:19: -------- Mapchange to surf_delusional_ --------As you can see, the map is immediately changed after proper next map is loaded, without even giving clients time to load into the server.
L 03/26/2019 - 19:38:07: [Custom Votes] DEBUG: Event CSGO_MapEnd. bCancelVoteGameEnd: 1 IsVoteInProgress: 0
L 03/26/2019 - 19:38:22: [Custom Votes] Last vote ( Changelevel ) passed. Map was changed from surf_amplitude_light to surf_2pacisalive.11 minutes later (on a normal map change), the vote that failed suddenly gets passed.
Educated myself a bit, IsVoteInProgress is a stock SourceMod function, and given the circumstances the bool value it is returning is correct. I'm really not sure why the map vote is not being invalidated properly upon failure. It seems to work the same as all other votes, as seen here.