Remove redundant pm_type/speed set in ClientBegin for demo mode

Server doesn't run PmoveSingle for demo spectator. cgame uses its
own local camera with PM_SPECTATOR. Game module checks
sess.sessionTeam, not pm_type. The set was dead code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
serge_shubin 2026-03-24 06:33:30 +08:00
parent f871cc004f
commit 72d5df4ec9

View file

@ -1030,13 +1030,6 @@ void ClientBegin( int clientNum ) {
// locate ent at a spawn point // locate ent at a spawn point
ClientSpawn( ent ); ClientSpawn( ent );
// demo playback: ClientThink_real (which normally sets pm_type
// for spectators) is disabled. Set it explicitly after spawn.
if ( g_svDemoPlaying.integer && client->sess.sessionTeam == TEAM_SPECTATOR ) {
client->ps.pm_type = PM_SPECTATOR;
client->ps.speed = 480;
}
if ( client->sess.sessionTeam != TEAM_SPECTATOR ) { if ( client->sess.sessionTeam != TEAM_SPECTATOR ) {
// send event // send event
tent = G_TempEntity( ent->client->ps.origin, EV_PLAYER_TELEPORT_IN ); tent = G_TempEntity( ent->client->ps.origin, EV_PLAYER_TELEPORT_IN );