jakubg1 / OpenSMCE

Game engine which allows creating a broad range of marble popper games.
MIT License
14 stars 11 forks source link

Game crashes when trying to load a shot sphere which has just touched a sphere chain #52

Closed jakubg1 closed 2 years ago

jakubg1 commented 2 years ago

If you shot a sphere onto any sphere train already on the board, and pause and exit the game right after the shot sphere hits the train, you would crash the game upon trying to load a level state in such a way.

In ShotSphere.lua, in serialize() function, you can find this piece of code:

        hitSphere = {
            pathID = 1,
            chainID = 2,
            groupID = 1,
            sphereID = 8
        }, -- TODO: add an indexation function in Sphere.lua to resolve this problem

This is a placeholder, and should certainly not be there. Replacing this with a proper working indexation code should resolve this issue.

jakubg1 commented 2 years ago

Fixed: https://github.com/jakubg1/OpenSMCE/commit/a9804c696b74a6408da04e885b44a7089b9eb69e