Oops, fixed global variable references
This commit is contained in:
parent
a2fcbfa7ec
commit
2ddead6962
1 changed files with 8 additions and 8 deletions
|
@ -215,13 +215,13 @@ Plane = Class{
|
||||||
shoot = function(self, down)
|
shoot = function(self, down)
|
||||||
if self.health > 0 then
|
if self.health > 0 then
|
||||||
if down then
|
if down then
|
||||||
if not kbdShooting and not joyShooting then
|
if not self.kbdShooting and not self.joyShooting then
|
||||||
self.machinegun:startShooting()
|
self.machinegun:startShooting()
|
||||||
end
|
end
|
||||||
kbdShooting = true
|
self.kbdShooting = true
|
||||||
else
|
else
|
||||||
kbdShooting = false
|
self.kbdShooting = false
|
||||||
if not kbdShooting and not joyShooting then
|
if not self.kbdShooting and not self.joyShooting then
|
||||||
self.machinegun:stopShooting()
|
self.machinegun:stopShooting()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -473,13 +473,13 @@ Plane = Class{
|
||||||
self.brake = brake
|
self.brake = brake
|
||||||
|
|
||||||
if fire then
|
if fire then
|
||||||
if not kbdShooting and not joyShooting then
|
if not self.kbdShooting and not self.joyShooting then
|
||||||
self.machinegun:startShooting()
|
self.machinegun:startShooting()
|
||||||
end
|
end
|
||||||
joyShooting = true
|
self.joyShooting = true
|
||||||
else
|
else
|
||||||
joyShooting = false
|
self.joyShooting = false
|
||||||
if not kbdShooting and not joyShooting then
|
if not self.kbdShooting and not self.joyShooting then
|
||||||
self.machinegun:stopShooting()
|
self.machinegun:stopShooting()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue