From 5688f9099ec844afe814b5c033db2919a85d36de Mon Sep 17 00:00:00 2001 From: AnotherCommander Date: Tue, 26 Nov 2024 12:04:21 +0200 Subject: [PATCH] Fixing bug where ECM effect does not work when no entities are on scanner - act 1 Also moving the ECM effect update code to a reasonable place - it has no business being in HeadUpDisplay.m. --- src/Core/HeadUpDisplay.m | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/Core/HeadUpDisplay.m b/src/Core/HeadUpDisplay.m index 767ded712..c7653b3f9 100644 --- a/src/Core/HeadUpDisplay.m +++ b/src/Core/HeadUpDisplay.m @@ -1188,8 +1188,6 @@ - (void) drawScanner:(NSDictionary *)info BOOL isHostile = NO; BOOL inColorBlindMode = [UNIVERSE colorblindMode] != OO_POSTFX_NONE; - - static BOOL gettingInterference = NO; if (emptyDial) { @@ -1323,28 +1321,6 @@ - (void) drawScanner:(NSDictionary *)info relativePosition = [PLAYER vectorTo:scannedEntity]; double fuzz = [PLAYER scannerFuzziness]; - if ([UNIVERSE useShaders] && [UNIVERSE ECMVisualFXEnabled]) - { - // we want to start and stop the effect exactly once, not start it - // or stop it on every frame - if (fuzz > 0.0) - { - if (!gettingInterference) - { - [UNIVERSE setCurrentPostFX:OO_POSTFX_CRTBADSIGNAL]; - gettingInterference = YES; - } - } - else - { - if (gettingInterference) - { - [UNIVERSE setCurrentPostFX:[UNIVERSE colorblindMode]]; - gettingInterference = NO; - } - } - } - if (fuzz > 0 && ![[UNIVERSE gameController] isGamePaused]) { relativePosition = vector_add(relativePosition,OOVectorRandomRadial(fuzz)); @@ -1499,11 +1475,6 @@ - (void) drawScanner:(NSDictionary *)info } } - else if ([UNIVERSE useShaders] && [UNIVERSE ECMVisualFXEnabled] && gettingInterference) - { - // no ECM interference fx if we are docking - [UNIVERSE setCurrentPostFX:[UNIVERSE colorblindMode]]; - } for (i = 0; i < ent_count; i++) {