Closed samaritan-sw closed 3 months ago
Thanks for the flag! Could you check if https://github.com/Phazorknight/Cogito/commit/84bc8a7a3597e7c92ccba21b692b84fc0d054d1e fixes this for you?
The reason was that when the laser rifle gets equipped, it grabs a scene reference. But when the scene isn't fully loaded yet, this reference is null, resulting in the error you saw. I've changed this to be a deferred call, which seems to fix this.
Nice one, that fixed it! 😄
Cogito and Godot Engine Version: Godot 4.2.1 and Cogito latest
Description: Shooting the laser rifle picked up in demo scene 5 after transitioning to scene 4 results in a crash. This does not happen with the foam pistol from scene 5, and the scene doesn't crash if, after loading scene 4, you put away the rifle, then equip it again before shooting.
Reproduction steps:
Expected behavior: The rifle shoots.
Screenshots:![image](https://github.com/Phazorknight/Cogito/assets/59507949/9a8b2264-6f91-4fb1-9e6c-4d0f8e4ecf05)