diff options
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r-- | src/game/g_cmds.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 8ad781ab..caa5f990 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -544,12 +544,22 @@ void Cmd_Noclip_f( gentity_t *ent ) char *msg; if( ent->client->noclip ) + { msg = "noclip OFF\n"; + ent->r.contents = ent->client->cliprcontents; + } else + { msg = "noclip ON\n"; + ent->client->cliprcontents = ent->r.contents; + ent->r.contents = 0; + } ent->client->noclip = !ent->client->noclip; + if( ent->r.linked ) + trap_LinkEntity( ent ); + trap_SendServerCommand( ent - g_entities, va( "print \"%s\"", msg ) ); } |