Auroriax / PuzzleScriptPlus

Puzzlescript Plus: Open Source HTML5 Puzzle Game Engine (with lots of extra functionality)
https://auroriax.github.io/PuzzleScript/
34 stars 4 forks source link

Broken `require_player_movement` #2

Closed icecoldtofu closed 3 years ago

icecoldtofu commented 3 years ago

746e37622970ad5f870db38a35ede9c8a982cebe broke require_player_movement, can't push crates.

ed6d8ca70fbbd7718c793a0b0a30578dce1189a5 broke it even more, can't move at all.

https://auroriax.github.io/PuzzleScript/editor.html?hack=4ab055be3ff003e017ec488397c9bbb3

Auroriax commented 3 years ago

Very curious behavior, thanks for reporting it! I have no idea what's going wrong here but it definitely has something to do with the local_radius changes. I'll look into it.

Auroriax commented 3 years ago

Should be fixed in https://github.com/Auroriax/PuzzleScript/commit/429c41bec8d59c1868e223da2e7f08aff4549e5d. The engine was checking the player positions at the start of the turn, but my added code sometimes updated that during the turn, causing player position to be incorrectly compared during the required movement check. Thank you for listing the commits and linking a project, that made it very easy to find the bug!