mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-28 16:31:15 +00:00
Fix zero division in unusual teams situations
This commit is contained in:
parent
da2a1dfd77
commit
045d561e4b
1 changed files with 4 additions and 1 deletions
|
|
@ -3496,6 +3496,9 @@ static void K_drawKartTeamScores(void)
|
|||
UINT16 enemyscore = g_teamscores[enemies];
|
||||
UINT16 totalscore = allyscore + enemyscore;
|
||||
|
||||
if (totalscore == 0)
|
||||
return;
|
||||
|
||||
using srb2::Draw;
|
||||
srb2::Draw::Font scorefont = Draw::Font::kTimer;
|
||||
|
||||
|
|
@ -3551,7 +3554,7 @@ static void K_drawKartTeamScores(void)
|
|||
{
|
||||
INT32 delta = abs(easedallyscore - allyscore); // how wrong is display score?
|
||||
|
||||
if (scorechangecooldown == 0)
|
||||
if (scorechangecooldown == 0 && delta)
|
||||
{
|
||||
if (allyscore > easedallyscore)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue