gdquest-demos / godot-platformer-2d

2d Metroidvania-inspired game for the 2019 GDquest Godot Kickstarter course project.
MIT License
633 stars 73 forks source link

Quickly hooking causes the game to crash #185

Open JPCard opened 4 years ago

JPCard commented 4 years ago

I'm submitting a...

Bug report

What is the current behavior? If the player quickly hooks a hook target a few times in a row the player shrinks itself and the game crashes.

What is the expected behavior? The game doesn't crashes when the player quickly hooks a hook target a few times in a row.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Start the game
  2. Quickly hook a hook target a few times in a row.

    Other

Stacktrace

`E 0:00:00.764 get_global_transform: Condition "!is_inside_tree()" is true. Returned: get_transform() <C++ Source> scene/2d/canvas_item.cpp:483 @ get_global_transform()

LevelLoader.gd:37 @ trigger() LevelLoader.gd:16 @ setup() Game.gd:13 @ _ready() ` ### Possible solution add a cooldown to the hook.
NathanLovato commented 4 years ago

Thanks, I have to test it to see exactly how this happens.

If the player shrinks, it means it's entering the Die state. So there might be an invisible enemy or something where the issue happened.