Skip to content

Commit

Permalink
fix(submixs): add the right values
Browse files Browse the repository at this point in the history
- add default submix values

Co-Authored-By: Poggu <[email protected]>
  • Loading branch information
AvarianKnight and Poggicek committed Feb 28, 2021
1 parent ce70a18 commit c0cb276
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ RegisterCommand('vol', function(_, args)
end
end)


-- default submix incase people want to fiddle with it.
-- freq_low = 389.0
-- freq_hi = 3248.0
-- fudge = 0.0
-- rm_mod_freq = 0.0
-- rm_mix = 0.16
-- o_freq_lo = 348.0
-- 0_freq_hi = 4900.0

-- radio submix
local radioEffectId = CreateAudioSubmix('Radio')
SetAudioSubmixEffectRadioFx(radioEffectId, 0)
Expand All @@ -48,8 +58,8 @@ AddAudioSubmixOutput(radioEffectId, 0)
local phoneEffectId = CreateAudioSubmix('Phone')
SetAudioSubmixEffectRadioFx(phoneEffectId, 1)
SetAudioSubmixEffectParamInt(phoneEffectId, 1, GetHashKey('default'), 1)
SetAudioSubmixEffectParamFloat(phoneEffectId, 1, GetHashKey('freq_low'), 20.2)
SetAudioSubmixEffectParamFloat(phoneEffectId, 1, GetHashKey('o_freq_lo'), 700.4)
SetAudioSubmixEffectParamFloat(phoneEffectId, 1, GetHashKey('freq_low'), 700.0)
SetAudioSubmixEffectParamFloat(phoneEffectId, 1, GetHashKey('freq_hi'), 15000.0)
AddAudioSubmixOutput(phoneEffectId, 1)

local submixFunctions = {
Expand Down
2 changes: 1 addition & 1 deletion client/module/radio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ RegisterCommand('+radiotalk', function()
-- since this is a shared resource (between my server and the public), probably don't want to try and use our export :P
-- use fallback in this case.
if GetResourceState("pma-ambulance") ~= "missing" then
if exports["pma-ambulance"]:isPlayerDead() then
if LocalPlayer.state.isDead then
return false
end
elseif IsPlayerDead(PlayerId()) then
Expand Down

0 comments on commit c0cb276

Please sign in to comment.