aboutsummaryrefslogtreecommitdiff
path: root/src/paperflight/static/draw.js
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-05-14 22:30:41 -0500
committerMark Powers <markppowers0@gmail.com>2020-05-14 22:30:41 -0500
commit7e469de9bc435b622eb415bf403727780ff95f4c (patch)
tree338a04bed2d022a72111cc1c2c4525f517b8772d /src/paperflight/static/draw.js
parent67d08e1f07d6eb261b98e90e6c803d64c22c1969 (diff)
Add switchable vents
Diffstat (limited to 'src/paperflight/static/draw.js')
-rw-r--r--src/paperflight/static/draw.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/paperflight/static/draw.js b/src/paperflight/static/draw.js
index a4d5310..0be9ae9 100644
--- a/src/paperflight/static/draw.js
+++ b/src/paperflight/static/draw.js
@@ -45,7 +45,7 @@ function drawVent() {
ctx.fillRect(this.x, this.y, this.width, 10)
// every 1/3 seconds spawn new air vents
// (since this is purely cosmetic, updates to it are in here)
- if (t % Math.floor(fps / 3) == 0) {
+ if ((this.state == -1 || this.state == switchState) && t % Math.floor(fps / 3) == 0) {
for (var j = 0; j <= this.width; j += 20) {
this.wind.push({
x: this.x + j,