diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-13 17:15:05 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:11 +0100 |
commit | 59875f1378dca6605cd0426eff89f850d8743c92 (patch) | |
tree | 386f33324df8e2c528b3237d86d4fb0c20a37aba /src/game/g_team.c | |
parent | 7224c7bf34cf7548f86a3af2247240705c0f4b4b (diff) |
fix noclipping players affecting other players
notably, other players were able to stand on the "center" of a noclipped player
set an r.contents value of 0 for noclipping clients, backing up the r.contents value in the new ent->client->cliprcontents field
Diffstat (limited to 'src/game/g_team.c')
-rw-r--r-- | src/game/g_team.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/g_team.c b/src/game/g_team.c index f3ca0f84..ad29beaf 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -222,7 +222,11 @@ void G_ChangeTeam( gentity_t *ent, team_t newTeam ) if( !g_cheats.integer ) { - ent->client->noclip = qfalse; + if( ent->client->noclip ) + { + ent->client->noclip = qfalse; + ent->r.contents = ent->client->cliprcontents; + } ent->flags &= ~( FL_GODMODE | FL_NOTARGET ); } |