Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local base_fire_sound = RaycastWeaponBase._fire_sound
- function RaycastWeaponBase:_fire_sound()
- local exclude = {}
- exclude["saw"] = true
- exclude["saw_secondary"] = true
- exclude["mg42"] = true
- exclude["m134"] = true
- exclude["flamethrower_mk2"] = true
- local name = self:get_name_id()
- if exclude[name] then
- base_fire_sound(self)
- end
- end
- local old_fire = RaycastWeaponBase.fire
- function RaycastWeaponBase:fire(...)
- local exclude = {}
- exclude["saw"] = true
- exclude["saw_secondary"] = true
- exclude["mg42"] = true
- exclude["m134"] = true
- exclude["flamethrower_mk2"] = true
- local name = self:get_name_id()
- local result = old_fire(self, ...)
- if exclude[name] then
- return result
- end
- if result then
- self:play_tweak_data_sound("fire_single", "fire")
- self:play_tweak_data_sound("stop_fire")
- end
- return result
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement