mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-21 20:01:18 +00:00
Fixed trying to play unavailable spree sounds (refs #95)
This commit is contained in:
parent
b4a6bcbb16
commit
b2c357b03f
1 changed files with 2 additions and 2 deletions
|
@ -265,7 +265,7 @@ function sprees.onPlayerSpree(clientId, causeId, type)
|
||||||
currentSpree,
|
currentSpree,
|
||||||
spreeNames[type])
|
spreeNames[type])
|
||||||
|
|
||||||
if settings.get("g_spreeSounds") > 0 and spreeMessage["sound"] and spreeMessage["sound"] ~= "" then
|
if settings.get("g_spreeSounds") > 0 and spreeMessage["sound"] and spreeMessage["sound"] ~= "" and files.exists("sound/spree/"..spreeMessage["sound"]) then
|
||||||
if bits.hasbit(settings.get("g_spreeSounds"), sprees.SOUND_PLAY_PUBLIC) then
|
if bits.hasbit(settings.get("g_spreeSounds"), sprees.SOUND_PLAY_PUBLIC) then
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "playsound \"sound/spree/"..spreeMessage["sound"].."\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "playsound \"sound/spree/"..spreeMessage["sound"].."\";")
|
||||||
else
|
else
|
||||||
|
@ -282,7 +282,7 @@ function sprees.onPlayerSpree(clientId, causeId, type)
|
||||||
currentSpree,
|
currentSpree,
|
||||||
spreeNames[type])
|
spreeNames[type])
|
||||||
|
|
||||||
if settings.get("g_spreeSounds") > 0 and maxSpreeMessage["sound"] and maxSpreeMessage["sound"] ~= "" then
|
if settings.get("g_spreeSounds") > 0 and maxSpreeMessage["sound"] and maxSpreeMessage["sound"] ~= "" and files.exists("sound/spree/"..spreeMessage["sound"]) then
|
||||||
if bits.hasbit(settings.get("g_spreeSounds"), sprees.SOUND_PLAY_PUBLIC) then
|
if bits.hasbit(settings.get("g_spreeSounds"), sprees.SOUND_PLAY_PUBLIC) then
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "playsound \"sound/spree/"..maxSpreeMessage["sound"].."\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "playsound \"sound/spree/"..maxSpreeMessage["sound"].."\";")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue