diff --git a/code/game/g_active.c b/code/game/g_active.c index 2a7764b..a43c4d2 100644 --- a/code/game/g_active.c +++ b/code/game/g_active.c @@ -453,8 +453,10 @@ void ClientTimerActions( gentity_t *ent, int msec ) { } } else { // count down health when over max - if ( ent->health > client->ps.stats[STAT_MAX_HEALTH] ) { - ent->health--; + if ( !g_quakeBehavior.integer ) { + if ( ent->health > client->ps.stats[STAT_MAX_HEALTH] ) { + ent->health--; + } } //Start killing players in LMS, if we are in overtime if(g_elimination_roundtime.integer&&g_gametype.integer==GT_LMS && TeamHealthCount( -1, TEAM_FREE ) != ent->health &&(level.roundNumber==level.roundNumberStarted)&&(level.time>=level.roundStartTime+1000*g_elimination_roundtime.integer)) { @@ -476,8 +478,10 @@ void ClientTimerActions( gentity_t *ent, int msec ) { client->ps.stats[STAT_ARMOR]+=g_regen_armor.integer; } // count down armor when over max - if ( client->ps.stats[STAT_ARMOR] > client->ps.stats[STAT_MAX_HEALTH] ) { - client->ps.stats[STAT_ARMOR]--; + if ( !g_quakeBehavior.integer ) { + if ( client->ps.stats[STAT_ARMOR] > client->ps.stats[STAT_MAX_HEALTH] ) { + client->ps.stats[STAT_ARMOR]--; + } } } if( bg_itemlist[client->ps.stats[STAT_PERSISTANT_POWERUP]].giTag == PW_AMMOREGEN ) { diff --git a/code/game/g_local.h b/code/game/g_local.h index bab682e..e37d181 100644 --- a/code/game/g_local.h +++ b/code/game/g_local.h @@ -1093,6 +1093,9 @@ extern vmCvar_t g_regen; extern vmCvar_t g_regen_armor; // New in Illusion Arena r42 extern vmCvar_t g_worldDamage; +// New in Illusion Arena r55 +// Quake-style behavior for stats +extern vmCvar_t g_quakeBehavior; //Free for all gametype extern int g_ffa_gt; //0 = TEAM GAME, 1 = FFA, 2 = TEAM GAME without bases diff --git a/code/game/g_main.c b/code/game/g_main.c index 3ccbb85..c44cbef 100644 --- a/code/game/g_main.c +++ b/code/game/g_main.c @@ -142,6 +142,9 @@ vmCvar_t g_regen; vmCvar_t g_regen_armor; // New in Illusion Arena r42 vmCvar_t g_worldDamage; +// New in Illusion Arena r55 +// Quake-style behavior for stats +vmCvar_t g_quakeBehavior; int g_ffa_gt; // Are this a FFA gametype even if gametype is high? vmCvar_t g_lms_lives; vmCvar_t g_lms_mode; @@ -365,6 +368,9 @@ static cvarTable_t gameCvarTable[] = { { &g_regen_armor, "g_regen_armor", "0", CVAR_NORESTART, 0, qtrue }, // New in Illusion Arena r42 { &g_worldDamage, "g_worldDamage", "1", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue }, + // New in Illusion Arena r55 + // Quake-style behavior for stats + { &g_quakeBehavior, "g_quakeBehavior", "1", CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue }, { &g_vampireMaxHealth, "g_vampire_max_health", "500", CVAR_NORESTART, 0, qtrue }, { &g_lms_lives, "g_lms_lives", "1", CVAR_NORESTART, 0, qtrue }, { &g_lms_mode, "g_lms_mode", "0", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue },