diff --git a/src/playsim/d_player.h b/src/playsim/d_player.h index 102b2e01a..f11763386 100644 --- a/src/playsim/d_player.h +++ b/src/playsim/d_player.h @@ -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. diff --git a/src/rendering/2d/v_blend.cpp b/src/rendering/2d/v_blend.cpp index 1a0a5af86..88476cfc9 100644 --- a/src/rendering/2d/v_blend.cpp +++ b/src/rendering/2d/v_blend.cpp @@ -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 ); diff --git a/wadsrc/static/zscript/actors/player/player.zs b/wadsrc/static/zscript/actors/player/player.zs index 95c8db40a..944e9bd5a 100644 --- a/wadsrc/static/zscript/actors/player/player.zs +++ b/wadsrc/static/zscript/actors/player/player.zs @@ -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;