Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug where you could travel through magic blocks while holding… #1465

Merged
merged 1 commit into from
Jul 16, 2020
Merged

Fixed a bug where you could travel through magic blocks while holding… #1465

merged 1 commit into from
Jul 16, 2020

Conversation

Semphriss
Copy link
Member

… a lantern of the same color by going fast enough.

I simply removed the delay before the block becomes solid.

When swimming, Tux can gain enough velocity to pass through magic blocks while carrying a lantern of a color that should make them turn solid. Levels that relies on the player's inability to pass a magic wall block while holding a lantern of a certain color can be easily broken by this.

… a lantern of the same color by going fast enough
@tobbi
Copy link
Member

tobbi commented Jul 15, 2020

I think this can be merged. Build failures are unrelated.

@Zwatotem
Copy link
Member

@tobbi Please, let me test this. I'm afraid that cooldown was there for a reason.

@Semphriss
Copy link
Member Author

I thought the same, but I don't seem to encounter any error in normal levels. If there were bugs, they might have been unknowingly fixed since the might-be-bugfix has been added.

I can try to investigate when and why this has been added, and if there are any known bugs related to that.

@Semphriss
Copy link
Member Author

Related issue : #335 : It was mentionned that it was to prevent flickering, but there is a minimum lighting time (of 1 second) which already fixes the problem.

Still looking at the commit log for other relevant information.

@Semphriss
Copy link
Member Author

I found 2 relevant commits :

Author: LMH
Date: Thu Jul 17 20:35:09 2014 -1000

Reduced the value of SWITCH_DELAY for magic blocks to prevent lanterns (and Tux) from prematurely passing through them while in free-fall

Author: Christoph Sommer
Date: Sat Aug 12 16:27:19 2006 +0000

Reduced switching delay from 1s to 0.1s

The "feature" was added between 7ddb11b and 5f6321f. There are no commits between them that affects magicblock.cpp. According to Git, "Reduced switching delay from 1s to 0.1s" actually added said delay. (That was back in 2006).

The commit adding the delay-before-switching (which was back then of one full second) doesn't seem to exist, for some reason.

@Zwatotem
Copy link
Member

I think it was there to prevent flickering in case magic block is on the edge of light source. But this value was lowered several times without complains. Merging.

@Zwatotem Zwatotem merged commit 94eca63 into SuperTux:master Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants