summaryrefslogtreecommitdiff
path: root/src/game/g_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_client.c')
-rw-r--r--src/game/g_client.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 76078040..548ec963 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -1199,7 +1199,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
int i;
clientPersistant_t saved;
clientSession_t savedSess;
- qboolean savedNoclip;
+ qboolean savedNoclip, savedCliprcontents;
int persistant[ MAX_PERSISTANT ];
gentity_t *spawnPoint = NULL;
int flags;
@@ -1283,6 +1283,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
savedSess = client->sess;
savedPing = client->ps.ping;
savedNoclip = client->noclip;
+ savedCliprcontents = client->cliprcontents;
for( i = 0; i < MAX_PERSISTANT; i++ )
persistant[ i ] = client->ps.persistant[ i ];
@@ -1294,6 +1295,7 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
client->sess = savedSess;
client->ps.ping = savedPing;
client->noclip = savedNoclip;
+ client->cliprcontents = savedCliprcontents;
client->lastkilled_client = -1;
for( i = 0; i < MAX_PERSISTANT; i++ )
@@ -1316,7 +1318,10 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
ent->client = &level.clients[ index ];
ent->takedamage = qtrue;
ent->classname = "player";
- ent->r.contents = CONTENTS_BODY;
+ if( client->noclip )
+ client->cliprcontents = CONTENTS_BODY;
+ else
+ ent->r.contents = CONTENTS_BODY;
ent->clipmask = MASK_PLAYERSOLID;
ent->die = player_die;
ent->waterlevel = 0;