diff --git a/code/game/bg_public.h b/code/game/bg_public.h index fb81a9483..c7cc69a50 100644 --- a/code/game/bg_public.h +++ b/code/game/bg_public.h @@ -291,6 +291,7 @@ typedef enum { PERS_SPAWN_COUNT, // incremented every respawn PERS_PLAYEREVENTS, // 16 bits that can be flipped for events PERS_ATTACKER, // clientnum of last damage inflicter + PERS_ATTACKEE_ARMOR, // health/armor of last person we attacked PERS_KILLED, // count of the number of times you died // player awards tracking PERS_EXCELLENT_COUNT, // two successive kills in a short amount of time diff --git a/code/game/g_combat.c b/code/game/g_combat.c index 2a677cae6..84053e7f3 100644 --- a/code/game/g_combat.c +++ b/code/game/g_combat.c @@ -882,6 +882,7 @@ void G_Damage(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, vec3_t } else { attacker->client->ps.persistant[PERS_HITS]++; } + attacker->client->ps.persistant[PERS_ATTACKEE_ARMOR] = (targ->health << 8) | (client->ps.stats[STAT_ARMOR]); } // always give half damage if hurting self