mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +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 enemyscore = g_teamscores[enemies];
|
||||||
UINT16 totalscore = allyscore + enemyscore;
|
UINT16 totalscore = allyscore + enemyscore;
|
||||||
|
|
||||||
|
if (totalscore == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
using srb2::Draw;
|
using srb2::Draw;
|
||||||
srb2::Draw::Font scorefont = Draw::Font::kTimer;
|
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?
|
INT32 delta = abs(easedallyscore - allyscore); // how wrong is display score?
|
||||||
|
|
||||||
if (scorechangecooldown == 0)
|
if (scorechangecooldown == 0 && delta)
|
||||||
{
|
{
|
||||||
if (allyscore > easedallyscore)
|
if (allyscore > easedallyscore)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue