From c081ab5cdc6b92d5c072c8a4d8fed4b3c005996e Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sun, 14 Jun 2015 14:56:21 +0200 Subject: always use ent->clipmask as pm->tracemask; move special casing to setting ent->clipmask in ClientSpawn() --- src/game/g_active.c | 9 ++------- src/game/g_client.c | 5 ++++- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') 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; -- cgit