[ioquake3] 07/50: Allow spectators to use noclip cheat

Simon McVittie smcv at debian.org
Sun Jul 23 21:55:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit 03336dd0bf823b8f3743b5329613d2e00f7a94e1
Author: Zack Middleton <zack at cloemail.com>
Date:   Sat Jun 24 20:04:27 2017 -0500

    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 93ff714..775604a 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list