[iortcw] 37/89: All: Allow spectators to use noclip
Simon McVittie
smcv at debian.org
Fri Sep 8 10:44:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to tag 1.51b
in repository iortcw.
commit f082d803b2903055d9790cd2a3676f5e9b51378e
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Tue Jul 18 14:02:45 2017 -0400
All: Allow spectators to use noclip
---
MP/code/game/g_active.c | 7 ++++++-
SP/code/game/g_active.c | 7 ++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/MP/code/game/g_active.c b/MP/code/game/g_active.c
index df01504..edada51 100644
--- a/MP/code/game/g_active.c
+++ b/MP/code/game/g_active.c
@@ -372,7 +372,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
if ( client->ps.sprintExertTime ) {
client->ps.speed *= 3; // (SA) allow sprint in free-cam mode
diff --git a/SP/code/game/g_active.c b/SP/code/game/g_active.c
index 23e9fb0..b4200ef 100644
--- a/SP/code/game/g_active.c
+++ b/SP/code/game/g_active.c
@@ -372,7 +372,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
if ( client->ps.sprintExertTime ) {
client->ps.speed *= 3; // (SA) allow sprint in free-cam mode
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list