diff options
author | Aki <nthirtyone@gmail.com> | 2016-06-04 16:31:07 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-06-04 16:31:07 +0200 |
commit | c08a8ce1673a742bd04e972df61e4db16f6bbd77 (patch) | |
tree | 42d0a7fe32afb72269089dc384f276f6e5756a0d | |
parent | 76361a11953a68f807275fd456667c7dcf0cbc97 (diff) | |
download | roflnauts-c08a8ce1673a742bd04e972df61e4db16f6bbd77.zip roflnauts-c08a8ce1673a742bd04e972df61e4db16f6bbd77.tar.gz roflnauts-c08a8ce1673a742bd04e972df61e4db16f6bbd77.tar.bz2 |
Prevent selecting empty naut
-rw-r--r-- | selector.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/selector.lua b/selector.lua index 81e8d19..5a1cb22 100644 --- a/selector.lua +++ b/selector.lua @@ -59,7 +59,9 @@ function Selector:controllerPressed(control, controller) elseif control == "right" and not self.state then self.naut = (self.naut % n) + 1 elseif control == "attack" then - self.state = true + if self.naut ~= 1 then + self.state = true + end elseif control == "jump" then if self.state == true then self.state = false |