aboutsummaryrefslogtreecommitdiff
path: root/waves.lua
diff options
context:
space:
mode:
authorChris Bradley <1029chris@gmail.com>2022-02-20 20:32:04 -0800
committerChris Bradley <1029chris@gmail.com>2022-02-20 20:32:04 -0800
commit531734dc2de04741ce1c9c8442718614c47bffd4 (patch)
tree006f91a3ce2c7297c8ff76da138ed507aee71fd9 /waves.lua
parent58632958abea0a00aea0e01e9897f587a1887bbd (diff)
I think I got some tokens here
Diffstat (limited to 'waves.lua')
-rw-r--r--waves.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/waves.lua b/waves.lua
index aff66e2..ad33f7c 100644
--- a/waves.lua
+++ b/waves.lua
@@ -308,11 +308,12 @@ function updatewaves()
end
end
if wave[currentwave].conditions() then
- if wave[currentwave+1].song and currentwave ~= 19 then --dont want the final wave to play the next song for dramatic effect
- playsong(wave[currentwave+1].song)
+ local nextwave = wave[currentwave+1]
+ if nextwave.song and currentwave ~= 19 then --dont want the final wave to play the next song for dramatic effect
+ playsong(nextwave.song)
end
delaytimer += ft
- if delaytimer > wave[currentwave+1].delay then
+ if delaytimer > nextwave.delay then
setwave(currentwave+1)
end
end