summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-09-12 10:59:25 +0200
committerAki <nthirtyone@gmail.com>2016-09-12 10:59:25 +0200
commite255f06e02b680442630fe2f6282c791e5acfd58 (patch)
treed7308347b0718d9d9a97089dce85de0f866aaaef /player.lua
parentadb0938f960312fef6f73640526e94d9bd3ce4ba (diff)
downloadroflnauts-e255f06e02b680442630fe2f6282c791e5acfd58.zip
roflnauts-e255f06e02b680442630fe2f6282c791e5acfd58.tar.gz
roflnauts-e255f06e02b680442630fe2f6282c791e5acfd58.tar.bz2
draw only alive players
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/player.lua b/player.lua
index b2a73d8..53f138c 100644
--- a/player.lua
+++ b/player.lua
@@ -286,6 +286,8 @@ end
-- Draw of `Player`
function Player:draw(offset_x, offset_y, scale, debug)
+ -- draw only alive
+ if not self.alive then return end
-- locals
local offset_x = offset_x or 0
local offset_y = offset_y or 0