mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Don't start a vote after vote passed for map change
Processing a callvote command after a vote passed to change maps but has not been executed yet will result in 1) map change immediately happening 2) after new map loads players have vote HUD messages but Game VM doesn't have a vote in progress. The phantom vote status will only be removed if players start a new vote or run vid_restart. The underlying issue is that a second callvote sets vote config strings but a map change is executed before they are sent to clients. Resulting in clients getting "cs" reliable commands with the config string changes _after_ the map change. Out of sync config strings. Even if the underlying issue was fixed, the second vote would be lost. So it's best to not force a map change to happen immediately anyway. Reported by Tobias Kuehnhammer.
This commit is contained in:
parent
300f06ce8d
commit
729766150f
1 changed files with 7 additions and 0 deletions
|
@ -1312,6 +1312,13 @@ void Cmd_CallVote_f( gentity_t *ent ) {
|
|||
|
||||
// if there is still a vote to be executed
|
||||
if ( level.voteExecuteTime ) {
|
||||
// don't start a vote when map change or restart is in progress
|
||||
if ( !Q_stricmpn( level.voteString, "map", 3 )
|
||||
|| !Q_stricmpn( level.voteString, "nextmap", 7 ) ) {
|
||||
trap_SendServerCommand( ent-g_entities, "print \"Vote after map change.\n\"" );
|
||||
return;
|
||||
}
|
||||
|
||||
level.voteExecuteTime = 0;
|
||||
trap_SendConsoleCommand( EXEC_APPEND, va("%s\n", level.voteString ) );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue