From 03336dd0bf823b8f3743b5329613d2e00f7a94e1 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 24 Jun 2017 20:04:27 -0500 Subject: [PATCH] Allow spectators to use noclip cheat --- code/game/g_active.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/game/g_active.c b/code/game/g_active.c index 93ff7147..775604a4 100644 --- a/code/game/g_active.c +++ b/code/game/g_active.c @@ -321,7 +321,12 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) { client = ent->client; if ( client->sess.spectatorState != SPECTATOR_FOLLOW ) { - client->ps.pm_type = PM_SPECTATOR; + if ( client->noclip ) { + client->ps.pm_type = PM_NOCLIP; + } else { + client->ps.pm_type = PM_SPECTATOR; + } + client->ps.speed = 400; // faster than normal // set up for pmove