diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c index e72c80e..20e7b58 100644 --- a/code/game/g_cmds.c +++ b/code/game/g_cmds.c @@ -661,6 +661,12 @@ void Cmd_Team_f( gentity_t *ent ) { int oldTeam; char s[MAX_TOKEN_CHARS]; + // demo playback: spectators only + if ( trap_Cvar_VariableIntegerValue( "sv_demoplaying" ) ) { + trap_SendServerCommand( ent-g_entities, "print \"Team changes disabled during demo playback.\n\"" ); + return; + } + if ( trap_Argc() != 2 ) { oldTeam = ent->client->sess.sessionTeam; switch ( oldTeam ) {