more ai work

This commit is contained in:
derek
2025-05-02 16:58:01 -05:00
parent 88a60d469e
commit 68facaf544
9 changed files with 38 additions and 54 deletions

View File

@@ -335,6 +335,7 @@ func _physics_process(delta):
var recoil_amount = Vector3(-.3,0,0)
land_sound.volume_db = land_volume
land_sound.play()
SignalBus.emit_signal("suspicious_sound",global_position,10,10)
Input.start_joy_vibration(0,.1,.1,.1)
recoil.add_recoil(recoil_amount,10,10)
moving_fast_top_speed = 0.0
@@ -555,6 +556,10 @@ func _headbob(time) -> Vector3:
if pos.y >= .07 and is_on_floor() and velocity.length() >= 1 and !footstep_sound.is_playing():
footstep_sound.play()
if !crouched:
SignalBus.emit_signal("suspicious_sound",global_position,10,7)
else:
SignalBus.emit_signal("suspicious_sound",global_position,5,1)
return pos