From bfb616d6541e4e0333b7d1ed53b945d16d18fad9 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Thu, 13 Apr 2017 11:30:00 +0000 Subject: 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 --- src/game/g_cmds.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/game/g_cmds.c') 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; } -- cgit