fix(candy-survival): initialize local client starting charges and support action_knock_tekton action in is_knock check
This commit is contained in:
@@ -90,6 +90,10 @@ func activate_client_side() -> void:
|
||||
hud_layer.visible = true
|
||||
set_process(true)
|
||||
|
||||
var local = multiplayer.get_unique_id()
|
||||
player_knocks[local] = START_KNOCK
|
||||
player_ghosts[local] = START_GHOST
|
||||
|
||||
if hud_stack_badge:
|
||||
hud_stack_badge.text = "Stack: 0 (x1.0)\nRed: 0x Blue: 0x Green: 0x Yellow: 0x"
|
||||
if hud_knock_label:
|
||||
@@ -176,6 +180,8 @@ func start_game_mode() -> void:
|
||||
player_last_knocked_by[pid] = 0
|
||||
_update_candy_badge(pid)
|
||||
_update_special_inventory_for_ghosts(pid)
|
||||
rpc("sync_knock_charge_count", pid, START_KNOCK)
|
||||
rpc("sync_ghost_charge_count", pid, START_GHOST)
|
||||
|
||||
print("[CandySurvival] Started with %d players" % pids.size())
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ func handle_unhandled_input(event):
|
||||
# 2. Action Buttons (Remappable via InputMap / KEY_Q override for Candy Survival)
|
||||
var is_knock = false
|
||||
if LobbyManager.game_mode == "Candy Survival":
|
||||
is_knock = (event is InputEventKey and event.pressed and not event.echo and event.keycode == KEY_Q)
|
||||
is_knock = (event is InputEventKey and event.pressed and not event.echo and event.keycode == KEY_Q) or event.is_action_pressed("action_knock_tekton")
|
||||
else:
|
||||
is_knock = event.is_action_pressed("action_knock_tekton")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user