Quake-style behavior for player stats

This commit is contained in:
Izuru Yakumo
2025-08-10 13:04:52 -03:00
parent 23733acd7f
commit a300afbbf5
3 changed files with 17 additions and 4 deletions

View File

@@ -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 ) {