feat: Implement core player character logic with networked movement, actions, state management, and character selection.

This commit is contained in:
Yogi Wiguna
2026-03-23 17:33:08 +08:00
parent bad2364fff
commit 9867ddc262
4 changed files with 18 additions and 7 deletions
+13
View File
@@ -750,6 +750,9 @@ func _apply_tint_recursive(node: Node, color: Color):
_apply_tint_recursive(child, color)
var immunity_timer: float = 0.0
var tekton_carry_timer: float = 0.0
const MAX_TEKTON_CARRY_TIME: float = 3.0
@rpc("any_peer", "call_local")
func apply_stagger(duration: float = 1.5):
@@ -1182,6 +1185,16 @@ func _physics_process(delta):
if can_rpc():
rpc("remote_set_position", current_world_pos, Time.get_ticks_msec())
# Tekton Auto-Drop Timer (3s Rule)
if is_multiplayer_authority() and is_carrying_tekton:
tekton_carry_timer += delta
if tekton_carry_timer >= MAX_TEKTON_CARRY_TIME:
tekton_carry_timer = 0.0
print("[Player %s] 3-second rule: Auto-dropping Tekton" % name)
drop_tekton()
elif not is_carrying_tekton:
tekton_carry_timer = 0.0
# NOTE: Finish line checking removed - game uses cycle-based goals system now
# --------------------------------------------------------------------