This commit is contained in:
cjayho 2017-05-01 14:03:23 +00:00 committed by GitHub
commit ba67b12dc4
4 changed files with 8 additions and 2 deletions

View file

@ -7963,7 +7963,7 @@ void idPlayer::CalcDamagePoints( idEntity *inflictor, idEntity *attacker, const
// check for completely getting out of the damage
if ( !damageDef->GetBool( "noGod" ) ) {
// check for godmode
if ( godmode ) {
if ( godmode || ( cvarSystem->GetCVarBool( "ch_god" ) ) ) {
damage = 0;
}
#ifdef _D3XP

View file

@ -69,6 +69,9 @@ struct gameVersion_s {
char string[256];
} gameVersion;
// cjayho: add cheat cvars. cheaters are people too
idCVar ch_god( "ch_god", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL | CVAR_CHEAT, "set game to permanent god mode" );
idCVar g_version( "g_version", gameVersion.string, CVAR_GAME | CVAR_ROM, "game version" );
// noset vars

View file

@ -6633,7 +6633,7 @@ void idPlayer::CalcDamagePoints( idEntity *inflictor, idEntity *attacker, const
// check for completely getting out of the damage
if ( !damageDef->GetBool( "noGod" ) ) {
// check for godmode
if ( godmode ) {
if ( godmode || ( cvarSystem->GetCVarBool( "ch_god" ) ) ) {
damage = 0;
}
}

View file

@ -59,6 +59,9 @@ struct gameVersion_s {
char string[256];
} gameVersion;
// cjayho: add cheat cvars. cheaters are people too
idCVar ch_god( "ch_god", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL | CVAR_CHEAT, "set game to permanent god mode" );
idCVar g_version( "g_version", gameVersion.string, CVAR_GAME | CVAR_ROM, "game version" );
// noset vars