diff options
author | /dev/humancontroller <devhc@example.com> | 2017-04-13 11:30:00 +0000 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 17:24:18 +0200 |
commit | bfb616d6541e4e0333b7d1ed53b945d16d18fad9 (patch) | |
tree | 517f8359df41297daa30a3a0ac716f0d5ab6f4c7 /src/game/g_client.c | |
parent | f38f646bfc1b9b3904359b92cbd16377cd618308 (diff) |
fix noclipping players affecting other players
notably, other players were able to stand on the "center" of a noclipped player
set no r.contents flags for noclipping clients, keeping the saved r.contents value in the new ent->client->pers.cliprcontents field
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r-- | src/game/g_client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c index c18af19..4b37a64 100644 --- a/src/game/g_client.c +++ b/src/game/g_client.c @@ -1808,7 +1808,10 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles ent->takedamage = qtrue; ent->inuse = qtrue; ent->classname = "player"; - ent->r.contents = CONTENTS_BODY; + if( client->noclip ) + client->pers.cliprcontents = CONTENTS_BODY; + else + ent->r.contents = CONTENTS_BODY; ent->clipmask = MASK_PLAYERSOLID; ent->die = player_die; ent->waterlevel = 0; |