extends BaseHitscanWeapon class_name MP7 func _init() -> void: weapon_name = "MP7" fire_rate = 0.05 # ~1200 RPM max_ammo = 45 reload_time = 1.2 base_damage = 12.0 min_damage = 3.0 falloff_start = 8.0 max_range = 50.0 automatic = true spread_angle = 0.025 func _build_model() -> void: position = Vector3(0.25, -0.25, -0.35) var model_scene = load("res://assets/weapons/mp7/source/HK MP7.fbx") if model_scene: var model = model_scene.instantiate() model_root.add_child(model) model.scale = Vector3(0.08, 0.08, 0.08) 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.9, 0.5) muzzle_flash.light_energy = 0.0 muzzle_flash.omni_range = 3.0 muzzle_flash.position = Vector3(0, 0.02, -0.2) model_root.add_child(muzzle_flash) # Audio fire_sound = AudioStreamPlayer3D.new() fire_sound.bus = "SFX" fire_sound.stream = AudioManager.stream_for("mp7_fire", "res://assets/sounds/mp7_fire.wav") fire_sound.position = muzzle_flash.position fire_sound.volume_db = -10.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)