Permalink
2 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This comment has been minimized.
Im trying to understand this. How was this a possible infinite loop before?
This comment has been minimized.
the loop isn't here, it's spread across multiple files, this is merely the root cause.
when an explosion happens, the game tries to center the camera on the sprites of the explosion before it proceeds.
when an explosion happens and no sprites are added, the game ends up in an un-resolvable loop where it's trying to center the camera on something that doesn't exist.
this code change simply makes sure that at least one explosion sprite is added, allowing the game to proceed normally.