mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- reimplement fix #1267 from @drfrag666 differently - fix damagecount overflow
This commit is contained in:
parent
1767fdfe7a
commit
e6c71c2f0c
3 changed files with 3 additions and 3 deletions
|
@ -348,7 +348,7 @@ public:
|
|||
short inconsistant = 0;
|
||||
bool waiting = 0;
|
||||
int killcount = 0, itemcount = 0, secretcount = 0; // for intermission
|
||||
int damagecount = 0, bonuscount = 0;// for screen flashing
|
||||
uint32_t damagecount = 0, bonuscount = 0;// for screen flashing
|
||||
int hazardcount = 0; // for delayed Strife damage
|
||||
int hazardinterval = 0; // Frequency of damage infliction
|
||||
FName hazardtype = NAME_None; // Damage type of last hazardous damage encounter.
|
||||
|
|
|
@ -141,7 +141,7 @@ void V_AddPlayerBlend (player_t *CPlayer, float blend[4], float maxinvalpha, int
|
|||
|
||||
if (painFlash.a != 0)
|
||||
{
|
||||
cnt = DamageToAlpha[MIN (113, CPlayer->damagecount * painFlash.a / 255)];
|
||||
cnt = DamageToAlpha[MIN (CPlayer->damagecount * painFlash.a / 255, (uint32_t)113)];
|
||||
|
||||
// [BC] Allow users to tone down the intensity of the blood on the screen.
|
||||
cnt = (int)( cnt * blood_fade_scalar );
|
||||
|
|
|
@ -2674,7 +2674,7 @@ struct PlayerInfo native play // self is what internally is known as player_t
|
|||
native int killcount;
|
||||
native int itemcount;
|
||||
native int secretcount;
|
||||
native int damagecount;
|
||||
native uint damagecount;
|
||||
native int bonuscount;
|
||||
native int hazardcount;
|
||||
native int hazardinterval;
|
||||
|
|
Loading…
Reference in a new issue