summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/g_active.c9
-rw-r--r--src/game/g_client.c5
2 files changed, 6 insertions, 8 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 49c23a43..3ec27aad 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -474,7 +474,7 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd )
pm.ps = &client->ps;
pm.pmext = &client->pmext;
pm.cmd = *ucmd;
- pm.tracemask = MASK_DEADSOLID; // spectators can fly through bodies
+ pm.tracemask = ent->clipmask;
pm.trace = trap_Trace;
pm.pointcontents = trap_PointContents;
@@ -1539,12 +1539,7 @@ void ClientThink_real( gentity_t *ent )
pm.ps = &client->ps;
pm.pmext = &client->pmext;
pm.cmd = *ucmd;
-
- if( pm.ps->pm_type == PM_DEAD )
- pm.tracemask = MASK_DEADSOLID;
- else
- pm.tracemask = MASK_PLAYERSOLID;
-
+ pm.tracemask = ent->clipmask;
pm.trace = trap_Trace;
pm.pointcontents = trap_PointContents;
pm.debugLevel = g_debugMove.integer;
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 31e3037a..8fd483e8 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1326,7 +1326,10 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
client->cliprcontents = CONTENTS_BODY;
else
ent->r.contents = CONTENTS_BODY;
- ent->clipmask = MASK_PLAYERSOLID;
+ if( client->pers.teamSelection == TEAM_NONE )
+ ent->clipmask = MASK_DEADSOLID;
+ else
+ ent->clipmask = MASK_PLAYERSOLID;
ent->die = player_die;
ent->waterlevel = 0;
ent->watertype = 0;