Closed MoonPadUSer closed 3 years ago
The line that crashes the game seems to be
src/game/game.cpp:941
float fluc = float(millis%burndelay)*(0.25f+0.03f)/burndelay;
Just found another line that causes it too
src/game/game.cpp:3614
else pc *= 0.75f+(float(millis%burndelay)/float(burndelay*4));
another one:
src/game/hud.cpp:3289
float pc = interval >= burntime-500 ? 1.f+(interval-(burntime-500))/500.f : (interval%burndelay)/float(burndelay/2); if(pc > 1.f) pc = 2.f-pc;
I'll use std::max(burndelay, 1) instead of burndelay everywhere it's used to divide, then I'll add a comment When playing on servers with older version, this value can be overriden to be 0, thus add a check to prevent division by 0
It's the same with shockdelay.
I'll make a separate PR for fixing shockdelay
when turning
burndelay
to 0 the game will crash when you start burning.