diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-13 17:14:58 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:11 +0100 |
commit | 7224c7bf34cf7548f86a3af2247240705c0f4b4b (patch) | |
tree | 490bc2ad2d623735ecb05b7d6869aa3895027262 /src/game/g_team.c | |
parent | 36920a29e0ef0d7d9d94597b3ca77abf572994dd (diff) |
improve the usability of noclip, notarget, give and godmode:
- godmode protects against everything (except suicides via the kill command)
- godmode can also be toggled when dead or spectating
- noclip, notarget, and godmode retain their status until explicitly toggled (except when outside of devmode, or when reconnecting), notably, they are not turned off when switching teams or suiciding
- funds can be given also when dead
- noclipping players do not activate any triggers
- map geometry does not interfere with noclipping players when it comes to changing classes
Diffstat (limited to 'src/game/g_team.c')
-rw-r--r-- | src/game/g_team.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/g_team.c b/src/game/g_team.c index dded18ee..f3ca0f84 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -220,6 +220,12 @@ void G_ChangeTeam( gentity_t *ent, team_t newTeam ) HUMAN_MAX_CREDITS / ALIEN_MAX_CREDITS + 0.5f ); } + if( !g_cheats.integer ) + { + ent->client->noclip = qfalse; + ent->flags &= ~( FL_GODMODE | FL_NOTARGET ); + } + // Copy credits to ps for the client ent->client->ps.persistant[ PERS_CREDIT ] = ent->client->pers.credit; |