summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index ec2b7db..9ebb659 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -527,9 +527,16 @@ void Cmd_Noclip_f( gentity_t *ent )
if( !g_devmapNoGod.integer )
{
if( ent->client->noclip )
+ {
msg = "noclip OFF\n";
+ ent->r.contents = ent->client->pers.cliprcontents;
+ }
else
+ {
msg = "noclip ON\n";
+ ent->client->pers.cliprcontents = ent->r.contents;
+ ent->r.contents = 0;
+ }
ent->client->noclip = !ent->client->noclip;
}