From 62a014f5f43470960ba288f7a7bbc69a69828069 Mon Sep 17 00:00:00 2001 From: RunninglVlan Date: Tue, 4 Jun 2024 23:44:16 +0300 Subject: [PATCH] fix: body_entered is triggered once more after moving player Workaround for https://github.com/godotengine/godot/issues/45131 --- multiplayer/multiplayer_player.gd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/multiplayer/multiplayer_player.gd b/multiplayer/multiplayer_player.gd index be38448..2e8c354 100644 --- a/multiplayer/multiplayer_player.gd +++ b/multiplayer/multiplayer_player.gd @@ -84,4 +84,9 @@ func _on_respawn_timer_timeout(): Engine.time_scale = 1 position = Vector2(0, 0) velocity = Vector2.ZERO + + # Workaround for https://github.com/godotengine/godot/issues/45131 + await get_tree().physics_frame + await get_tree().physics_frame + collision_shape.set_deferred("disabled", false)