big
This commit is contained in:
@@ -81,13 +81,8 @@ func update(delta: float) -> void:
|
||||
if current_hspeed > 1.0 and player.is_on_floor():
|
||||
_footstep_timer -= delta
|
||||
if _footstep_timer <= 0.0:
|
||||
if player.footstep_player:
|
||||
# Random sample + slight pitch variation so steps don't machine-gun.
|
||||
if "footstep_streams" in player and not player.footstep_streams.is_empty():
|
||||
player.footstep_player.stream = player.footstep_streams.pick_random()
|
||||
player.footstep_player.pitch_scale = randf_range(0.92, 1.08)
|
||||
player.footstep_player.volume_db = -6.0
|
||||
player.footstep_player.play()
|
||||
if player.has_method("play_footstep"):
|
||||
player.play_footstep(current_hspeed)
|
||||
_footstep_timer = max(0.2, 3.0 / current_hspeed)
|
||||
else:
|
||||
_footstep_timer = 0.0
|
||||
|
||||
Reference in New Issue
Block a user