Fix hud crash if player was "gone'd" by Ynykron.

This commit is contained in:
Mari the Deer 2022-07-13 09:47:16 +02:00
commit 4198de6ddf
2 changed files with 3 additions and 2 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r172 \cu(Mon 11 Jul 22:35:36 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r172 \cu(2022-07-11 22:35:36)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r173 \cu(Wed 13 Jul 09:47:16 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r173 \cu(2022-07-13 09:47:16)\c-";

View file

@ -3054,6 +3054,7 @@ Class SWWMStatusBar : BaseStatusBar
{
rss = int(MSTimeF())*128;
let demo = Demolitionist(CPlayer.mo);
if ( !demo ) return;
double paintime = clamp((demo.lastdamagetimer-(gametic+Fractic))/35.,0.,1.);
double noiz = min(demo.lastdamage*.5*paintime,3.);
Vector2 shake = (RandomShiver(),RandomShiver())*noiz;