Advertisement
Guest User

Untitled

a guest
Mar 26th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. local base_fire_sound = RaycastWeaponBase._fire_sound
  2. function RaycastWeaponBase:_fire_sound()
  3.     local exclude = {}
  4.     exclude["saw"] = true
  5.     exclude["saw_secondary"] = true
  6.     exclude["mg42"] = true
  7.     exclude["m134"] = true
  8.     exclude["flamethrower_mk2"] = true
  9.    
  10.     local name = self:get_name_id()
  11.    
  12.     if exclude[name] then
  13.         base_fire_sound(self)
  14.     end
  15. end
  16. local old_fire = RaycastWeaponBase.fire
  17. function RaycastWeaponBase:fire(...)
  18.     local exclude = {}
  19.     exclude["saw"] = true
  20.     exclude["saw_secondary"] = true
  21.     exclude["mg42"] = true
  22.     exclude["m134"] = true
  23.     exclude["flamethrower_mk2"] = true
  24.    
  25.     local name = self:get_name_id()
  26.     local result = old_fire(self, ...)
  27.     if exclude[name] then
  28.         return result
  29.     end
  30.     if result then
  31.         self:play_tweak_data_sound("fire_single", "fire")
  32.         self:play_tweak_data_sound("stop_fire")
  33.     end
  34.     return result
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement