From 2ddead69623ccb03ac796b65585b7233ac01ba46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= Date: Wed, 22 Oct 2014 21:52:30 +0300 Subject: [PATCH] Oops, fixed global variable references --- entities/plane.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/entities/plane.lua b/entities/plane.lua index 68fffd6..5bcf4c8 100644 --- a/entities/plane.lua +++ b/entities/plane.lua @@ -215,13 +215,13 @@ Plane = Class{ shoot = function(self, down) if self.health > 0 then if down then - if not kbdShooting and not joyShooting then + if not self.kbdShooting and not self.joyShooting then self.machinegun:startShooting() end - kbdShooting = true + self.kbdShooting = true else - kbdShooting = false - if not kbdShooting and not joyShooting then + self.kbdShooting = false + if not self.kbdShooting and not self.joyShooting then self.machinegun:stopShooting() end end @@ -473,13 +473,13 @@ Plane = Class{ self.brake = brake if fire then - if not kbdShooting and not joyShooting then + if not self.kbdShooting and not self.joyShooting then self.machinegun:startShooting() end - joyShooting = true + self.joyShooting = true else - joyShooting = false - if not kbdShooting and not joyShooting then + self.joyShooting = false + if not self.kbdShooting and not self.joyShooting then self.machinegun:stopShooting() end end