From 7e469de9bc435b622eb415bf403727780ff95f4c Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Thu, 14 May 2020 22:30:41 -0500 Subject: Add switchable vents --- src/paperflight/static/draw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/paperflight/static/draw.js') 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, -- cgit v1.2.3