From c817b33e37da435d5bedd7d254ded9e8f1c80fef Mon Sep 17 00:00:00 2001 From: AnotherCommander Date: Tue, 26 Nov 2024 13:51:47 +0200 Subject: [PATCH] Fixing bug where postFXs don't stop upon death - act 3 They wouldn't stop also on docking, so added that case too. --- src/Core/Entities/PlayerEntity.m | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Core/Entities/PlayerEntity.m b/src/Core/Entities/PlayerEntity.m index a58d2e5c8..5d3005871 100644 --- a/src/Core/Entities/PlayerEntity.m +++ b/src/Core/Entities/PlayerEntity.m @@ -2839,7 +2839,7 @@ - (void) doBookkeeping:(double) delta_t { if (gettingInterference) { - [UNIVERSE setCurrentPostFX:[UNIVERSE colorblindMode]]; + [UNIVERSE terminatePostFX:OO_POSTFX_CRTBADSIGNAL]; gettingInterference = NO; } } @@ -3956,16 +3956,17 @@ - (void) performDockingUpdates:(OOTimeDelta)delta_t [self docked]; // bookkeeping for docking } - // if ecm visual effect is playing while docking, terminate it - if ([UNIVERSE useShaders] && [UNIVERSE ECMVisualFXEnabled] && [UNIVERSE currentPostFX] == OO_POSTFX_CRTBADSIGNAL) - { - [UNIVERSE setCurrentPostFX:[UNIVERSE colorblindMode]]; - } + // if cloak or ecm visual effects are playing while docking, terminate them + [UNIVERSE terminatePostFX:OO_POSTFX_CLOAK]; + if ([UNIVERSE ECMVisualFXEnabled]) [UNIVERSE terminatePostFX:OO_POSTFX_CRTBADSIGNAL]; } - (void) performDeadUpdates:(OOTimeDelta)delta_t { + [UNIVERSE terminatePostFX:OO_POSTFX_CLOAK]; + if ([UNIVERSE ECMVisualFXEnabled]) [UNIVERSE terminatePostFX:OO_POSTFX_CRTBADSIGNAL]; + [self gameOverFadeToBW]; if ([self shotTime] > kDeadResetTime) @@ -6086,7 +6087,7 @@ - (void) deactivateCloakingDevice if (![self hasCloakingDevice]) return; [super deactivateCloakingDevice]; - [UNIVERSE setCurrentPostFX:[UNIVERSE colorblindMode]]; + [UNIVERSE terminatePostFX:OO_POSTFX_CLOAK]; [UNIVERSE addMessage:DESC(@"cloak-off") forCount:2]; [self playCloakingDeviceOff]; }