diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-14 15:58:13 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:16 +0100 |
commit | 66606bb27c471802722cd1294924e450dae00043 (patch) | |
tree | 05472afc5b73479338505ac5276013d8dcb232c9 /src/game/g_combat.c | |
parent | f8a0a02075de58dd8c269d9eef80a84c6bea0f15 (diff) |
synchronize ent->health with ent->client->ps.stats[STAT_HEALTH]
when healing, keep the health untouched if the health is already above the "maximum"
Diffstat (limited to 'src/game/g_combat.c')
-rw-r--r-- | src/game/g_combat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/g_combat.c b/src/game/g_combat.c index 29a1af3d..d7f15806 100644 --- a/src/game/g_combat.c +++ b/src/game/g_combat.c @@ -1160,7 +1160,11 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, targ->flags |= FL_NO_KNOCKBACK; if( targ->health < -999 ) + { targ->health = -999; + if( targ->client ) + targ->client->ps.stats[ STAT_HEALTH ] = -999; + } targ->enemy = attacker; targ->die( targ, inflictor, attacker, take, mod ); |