From 804b33f389bd46913215dbdf6f5a633cec3bc03d Mon Sep 17 00:00:00 2001 From: LBPHacker Date: Sun, 6 Nov 2016 16:03:57 +0100 Subject: [PATCH] Fix WIFI cooldown 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. --- src/simulation/elements/WIFI.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/simulation/elements/WIFI.cpp b/src/simulation/elements/WIFI.cpp index 1bd83b038..35ba95b08 100644 --- a/src/simulation/elements/WIFI.cpp +++ b/src/simulation/elements/WIFI.cpp @@ -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;