fix second timer bug

This commit is contained in:
Milang 2020-02-20 18:24:40 +01:00
parent da4d716878
commit 98ff078150
2 changed files with 8 additions and 5 deletions

Binary file not shown.

View File

@ -70,7 +70,7 @@ void coinAdd()
void scoreAdd(int i)
{
if (i==0)
return;
return;
if (time_id-combo_id<=12 && combo)
{
score+=i;
@ -108,11 +108,14 @@ void scoreDisplay()
dtext(50,0,str, C_BLACK, C_WHITE);
}
if (mario_dead==0 && finish_level==0) time_id++;
if (0==time_id%8)
if (mario_dead==0 && finish_level==0)
{
time_left--;
time_spent++;
time_id++;
if (0==time_id%8)
{
time_left--;
time_spent++;
}
}
sprintf(str, "%d", time_left);