Fix player disconnect handling during demo playback
Clear the game module's playerState when a recorded player disconnects, so G_RunFrame sees commandTime=0 and marks them as CON_DISCONNECTED. Without this, disconnected players stayed visible on the scoreboard indefinitely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1f8c8aea1c
commit
1a186eeb81
1 changed files with 5 additions and 0 deletions
|
|
@ -631,6 +631,11 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
demo.playPrevPlayers[clientNum].active = qfalse;
|
demo.playPrevPlayers[clientNum].active = qfalse;
|
||||||
|
// clear game playerState so G_RunFrame sees commandTime=0
|
||||||
|
if ( clientNum != demo.spectatorClientNum ) {
|
||||||
|
playerState_t *gamePs = SV_GameClientNum( clientNum );
|
||||||
|
Com_Memset( gamePs, 0, sizeof(*gamePs) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue