diff options
author | nokoe <nokoe@mailbox.org> | 2024-06-24 14:27:55 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-06-24 14:27:55 +0200 |
commit | e123565277c0dc2508b47c2587c22c9fe6e3d738 (patch) | |
tree | 177ac16d2d7d408fe79ffaf3aa2066473ac83d0a | |
parent | c011ed88fbacee5c736a712128bc248ff4061546 (diff) | |
download | hurrycurry-e123565277c0dc2508b47c2587c22c9fe6e3d738.tar hurrycurry-e123565277c0dc2508b47c2587c22c9fe6e3d738.tar.bz2 hurrycurry-e123565277c0dc2508b47c2587c22c9fe6e3d738.tar.zst |
set_item: free items in hand
-rw-r--r-- | client/game.gd | 2 | ||||
-rw-r--r-- | client/player/player.gd | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/client/game.gd b/client/game.gd index 74c79d8b..f1f4e065 100644 --- a/client/game.gd +++ b/client/game.gd @@ -51,7 +51,7 @@ func _ready(): var player: Player = players.get(id) if player != null: if player.hand != null: - player.hand.free() + player.hand.queue_free() players.erase(id) player.queue_free() ) diff --git a/client/player/player.gd b/client/player/player.gd index a6122a97..d64b5d43 100644 --- a/client/player/player.gd +++ b/client/player/player.gd @@ -51,6 +51,8 @@ func update_position(new_position: Vector2, new_rotation: float): func set_item(i: Item): i.owned_by = hand_base + if hand != null: + hand.queue_free() if i == null: push_error("tile is null") hand = i |