extends BaseHitscanWeapon class_name AK47 func _init() -> void: weapon_name = "AK-47" fire_rate = 0.15 # ~400 RPM max_ammo = 30 reload_time = 2.0 base_damage = 35.0 min_damage = 25.0 falloff_start = 25.0 max_range = 150.0 automatic = true spread_angle = 0.015 func _build_model() -> void: position = Vector3(0.3, -0.3, -0.590) var model_scene = load("res://assets/weapons/ak47/source/scene.gltf") if model_scene: var model = model_scene.instantiate() model_root.add_child(model) model.scale = Vector3(0.00125, 0.00125, 0.00125) model.rotation_degrees.y = 90 for light in model.find_children("*", "Light3D", true, false): light.queue_free() # Muzzle Flash muzzle_flash = OmniLight3D.new() muzzle_flash.light_color = Color(1.0, 0.7, 0.2) muzzle_flash.light_energy = 0.0 muzzle_flash.omni_range = 5.0 muzzle_flash.position = Vector3(0, 0.03, -0.45) model_root.add_child(muzzle_flash) # Audio fire_sound = AudioStreamPlayer3D.new() fire_sound.bus = "SFX" fire_sound.stream = AudioManager.stream_for("ak47_fire", "res://assets/sounds/ak47_fire.wav") fire_sound.position = muzzle_flash.position fire_sound.volume_db = -5.0 model_root.add_child(fire_sound) reload_sound = AudioStreamPlayer3D.new() reload_sound.bus = "SFX" reload_sound.stream = AudioManager.stream_for("shotgun_reload", "res://assets/sounds/shotgun_reload.wav") model_root.add_child(reload_sound)