Skip to content

Commit

Permalink
Fix WIFI cooldown
Browse files Browse the repository at this point in the history
For some reason WIFI would only add sparks to the spark queue
(sim->wireless[1]) if there was no spark added to it in the previous
frame (sim->wireless[0] in the current frame). Fixed.
  • Loading branch information
LBPHacker authored and jacob1 committed Mar 21, 2017
1 parent 9bb471d commit 804b33f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/simulation/elements/WIFI.cpp
Expand Up @@ -70,13 +70,10 @@ int Element_WIFI::update(UPDATE_FUNC_ARGS)
parts[r>>8].life = 4;
}
}
else
if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3)
{
if ((r&0xFF)==PT_SPRK && parts[r>>8].ctype!=PT_NSCN && parts[r>>8].life>=3)
{
sim->wireless[parts[i].tmp][1] = 1;
sim->ISWIRE = 2;
}
sim->wireless[parts[i].tmp][1] = 1;
sim->ISWIRE = 2;
}
}
return 0;
Expand Down

0 comments on commit 804b33f

Please sign in to comment.