Skip to content

Commit

Permalink
Fixing bug where postFXs don't stop upon death - act 3
Browse files Browse the repository at this point in the history
They wouldn't stop also on docking, so added that case too.
  • Loading branch information
AnotherCommander authored Nov 26, 2024
1 parent 9f79b90 commit c817b33
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/Core/Entities/PlayerEntity.m
Original file line number Diff line number Diff line change
Expand Up @@ -2839,7 +2839,7 @@ - (void) doBookkeeping:(double) delta_t
{
if (gettingInterference)
{
[UNIVERSE setCurrentPostFX:[UNIVERSE colorblindMode]];
[UNIVERSE terminatePostFX:OO_POSTFX_CRTBADSIGNAL];
gettingInterference = NO;
}
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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];
}
Expand Down

0 comments on commit c817b33

Please sign in to comment.