Skip to content

Commit

Permalink
Revert "GAME: removed unused player state persistence enum"
Browse files Browse the repository at this point in the history
This reverts commit 793e96c.
We need this for the advanced hitsound feedback.
  • Loading branch information
kai-li-wop committed Nov 8, 2023
1 parent 8478032 commit 01ffab3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/game/bg_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/game/g_combat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01ffab3

Please sign in to comment.