big
This commit is contained in:
@@ -42,6 +42,11 @@ func _ready() -> void:
|
||||
model_root = Node3D.new()
|
||||
add_child(model_root)
|
||||
_build_model()
|
||||
if fire_sound:
|
||||
AudioManager.configure_player(fire_sound,
|
||||
AudioManager.weapon_sound_id(weapon_name))
|
||||
if reload_sound:
|
||||
AudioManager.configure_player(reload_sound, "shotgun_reload")
|
||||
|
||||
func _build_model() -> void:
|
||||
# Virtual method to be overridden
|
||||
@@ -115,8 +120,10 @@ func _fire() -> void:
|
||||
get_parent().add_recoil(recoil_amplitude, randf_range(-recoil_amplitude * 0.5, recoil_amplitude * 0.5))
|
||||
|
||||
if fire_sound:
|
||||
# Slight pitch variation
|
||||
fire_sound.pitch_scale = 1.0 + randf_range(-0.05, 0.05)
|
||||
# The event family already randomizes its recorded variations. Keep the
|
||||
# player-level shift tiny so sustained fire stays like one weapon, not
|
||||
# a row of differently sized cartoon rifles.
|
||||
fire_sound.pitch_scale = 1.0 + randf_range(-0.015, 0.015)
|
||||
fire_sound.play()
|
||||
|
||||
if current_ammo == 0:
|
||||
|
||||
Reference in New Issue
Block a user