feat: implement core movement, combat, weapon management, and networking systems
This commit is contained in:
@@ -163,7 +163,7 @@ func _try_start_grapple() -> void:
|
||||
grapple_length = origin.distance_to(grapple_point)
|
||||
|
||||
# Travel at 45 m/s
|
||||
grapple_travel_time = grapple_length / 45
|
||||
grapple_travel_time = 0.0
|
||||
grapple_shoot_time = 0.0
|
||||
is_grapple_shooting = true
|
||||
movement_event.emit("grapple_shoot", {})
|
||||
|
||||
@@ -712,6 +712,8 @@ func _physics_process(_delta: float) -> void:
|
||||
# Write synced state for remote peers
|
||||
synced_movement_state = sm.current_state
|
||||
synced_movement_speed = Vector2(velocity.x, velocity.z).length()
|
||||
if synced_movement_speed < 0.1:
|
||||
synced_movement_speed = 0.0
|
||||
synced_is_crouching = sm.input_crouch
|
||||
|
||||
|
||||
@@ -887,6 +889,11 @@ func die(impulse: Vector3 = Vector3.ZERO) -> void:
|
||||
if _machine:
|
||||
_machine.process_mode = Node.PROCESS_MODE_DISABLED
|
||||
|
||||
if camera:
|
||||
camera.fov = 90.0
|
||||
if head_pivot and head_pivot.has_method("set_weapon_fov"):
|
||||
head_pivot.set_weapon_fov(-1.0)
|
||||
|
||||
# Hide old animated model
|
||||
var humanoid = get_node_or_null("HumanoidModel")
|
||||
if humanoid:
|
||||
|
||||
Reference in New Issue
Block a user