From 72d5df4ec9aaaf60bbcd86b9235edfbda14660c1 Mon Sep 17 00:00:00 2001 From: serge_shubin Date: Tue, 24 Mar 2026 06:33:30 +0800 Subject: [PATCH] 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) --- code/game/g_client.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/code/game/g_client.c b/code/game/g_client.c index 9aed85c..6d43d7c 100644 --- a/code/game/g_client.c +++ b/code/game/g_client.c @@ -1030,13 +1030,6 @@ void ClientBegin( int clientNum ) { // locate ent at a spawn point 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 ) { // send event tent = G_TempEntity( ent->client->ps.origin, EV_PLAYER_TELEPORT_IN );