fixes
This commit is contained in:
parent
847670821d
commit
c5a54977ac
7 changed files with 16 additions and 6 deletions
|
@ -57,7 +57,17 @@ func assign_world_camera():
|
|||
cameraFollow.remote_path = MainInstances.WorldCamera.get_path()
|
||||
|
||||
func _exit_tree():
|
||||
MainInstances.Player = null
|
||||
# We need to check if the player in maininstances is this player instance,
|
||||
# it could be a loaded player and this call is made after the new player
|
||||
# is instanced and set in the MainInstances, so the new player is there and
|
||||
# we set it to null, breaking the game.
|
||||
if MainInstances.Player == self:
|
||||
MainInstances.Player = null
|
||||
|
||||
# This is another solution to the above problem
|
||||
# func queue_free():
|
||||
# MainInstances.Player = null
|
||||
# .queue_free()
|
||||
|
||||
func _physics_process(delta):
|
||||
just_jumped = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue