diff options
| author | 1029chris <1029chris@gmail.com> | 2022-02-09 20:40:16 -0800 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2022-02-09 20:40:16 -0800 |
| commit | 0fa5fb690753ef6cbdb22795648a4373d1a0e18c (patch) | |
| tree | a2f1476b4c8ee793c8cfcb2fab18a819a309c6c1 /pickups.lua | |
| parent | 19a80ae48f1beec8b82f785d46a5b9015f9266c4 (diff) | |
respawn sound implemented, fixed dead players picking up pickups
Diffstat (limited to 'pickups.lua')
| -rw-r--r-- | pickups.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pickups.lua b/pickups.lua index 400917c..c5f8ea2 100644 --- a/pickups.lua +++ b/pickups.lua @@ -27,7 +27,7 @@ function addpickup(x, y, type) end function pickup.collide(player) - if pickup.x+4 >= player.x-4 and pickup.x+4 <= player.x+4+player.w and pickup.y+4 >= player.y-4 and pickup.y+4 <= player.y+player.h+4 then + if pickup.x+4 >= player.x-4 and pickup.x+4 <= player.x+4+player.w and pickup.y+4 >= player.y-4 and pickup.y+4 <= player.y+player.h+4 and player.health > 0 then pickup:affect(player) for i = 1, 8, 1 do local color = 8 |
