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

Explosion sprite frame crash #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

karjonas
Copy link

@karjonas karjonas commented Jan 8, 2017

When running with very slow fps the calculated frame sprite number could become too high leading to a crash when reading outside the sprite array. This fixes the issue and makes the code a bit clearer.

The sprite frame is now calculated by the function and made sure not to index outside the number of available frames.

Also added defines and names for magic constants used to clarify.
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.

1 participant