Weapons other than the first 2 guns are no longer preloaded.
This commit is contained in:
parent
bf3838f84a
commit
ea99b6de12
@ -69,8 +69,11 @@ local function play_sound(sound, channel, loop)
|
|||||||
sound:playChannel(channel, loop)
|
sound:playChannel(channel, loop)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- I would rather get rid of this function and just have the one play function
|
local function play_at_location(sound, xPosition, yPosition)
|
||||||
local function pan_sound(mixer, sound)
|
channel = channel or -1
|
||||||
|
loop = loop or 0
|
||||||
|
xPosition = xPosition or 0
|
||||||
|
yPosition = yPosition or 0
|
||||||
mixer.SetPanning(-1, 255, 127)
|
mixer.SetPanning(-1, 255, 127)
|
||||||
sound:playChannel(-1, 0)
|
sound:playChannel(-1, 0)
|
||||||
end
|
end
|
||||||
@ -145,7 +148,9 @@ while running do
|
|||||||
keyName = "0"
|
keyName = "0"
|
||||||
elseif tonumber(keyName) >= 1 and tonumber(keyName) <= 5 then
|
elseif tonumber(keyName) >= 1 and tonumber(keyName) <= 5 then
|
||||||
weapon = tonumber(keyName)
|
weapon = tonumber(keyName)
|
||||||
loaded = true
|
if weapon >= 3 then
|
||||||
|
loaded = false
|
||||||
|
end
|
||||||
if weapon == 1 then
|
if weapon == 1 then
|
||||||
speak("pistal")
|
speak("pistal")
|
||||||
elseif weapon == 2 then
|
elseif weapon == 2 then
|
||||||
|
Loading…
Reference in New Issue
Block a user