feat: update candy logic
This commit is contained in:
@@ -103,7 +103,7 @@ func handle_unhandled_input(event):
|
||||
if event.is_action_pressed("action_knock_tekton"):
|
||||
if LobbyManager.game_mode == "Candy Survival":
|
||||
var gm = player.get_node_or_null("/root/Main/CandySurvivalManager")
|
||||
if gm and gm.is_active:
|
||||
if gm and gm.active:
|
||||
# Find a target to knock (first adjacent player)
|
||||
var p_pos = player.current_position
|
||||
var all_players = get_tree().get_nodes_in_group("Players")
|
||||
@@ -130,7 +130,7 @@ func handle_unhandled_input(event):
|
||||
elif event.is_action_pressed("action_grab_tekton"):
|
||||
if LobbyManager.game_mode == "Candy Survival":
|
||||
var gm = player.get_node_or_null("/root/Main/CandySurvivalManager")
|
||||
if gm and gm.is_active:
|
||||
if gm and gm.active:
|
||||
var pid = player.get("peer_id") if "peer_id" in player else player.name.to_int()
|
||||
if multiplayer.is_server():
|
||||
gm.try_activate_ghost(pid)
|
||||
|
||||
Reference in New Issue
Block a user