diff options
author | /dev/humancontroller <devhc@example.com> | 2015-06-14 14:56:21 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:16 +0100 |
commit | c081ab5cdc6b92d5c072c8a4d8fed4b3c005996e (patch) | |
tree | 9570b429322b1642a2affcd524120b3763b96424 /src/game | |
parent | 66606bb27c471802722cd1294924e450dae00043 (diff) |
always use ent->clipmask as pm->tracemask; move special casing to setting ent->clipmask in ClientSpawn()
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_active.c | 9 | ||||
-rw-r--r-- | src/game/g_client.c | 5 |
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; |