don't attract xp when dead
This commit is contained in:
parent
9c95fc1784
commit
50beae1852
@ -1712,7 +1712,8 @@ function xp_gem:draw()
|
||||
end
|
||||
|
||||
function xp_gem:move()
|
||||
if abs(self.x + 1 - primary_ship.x - primary_ship.hurt.x_off) <= primary_ship.magnet and abs(self.y + 1 - primary_ship.y - primary_ship.hurt.y_off) <= primary_ship.magnet then
|
||||
|
||||
if not primary_ship.dead and abs(self.x + 1 - primary_ship.x - primary_ship.hurt.x_off) <= primary_ship.magnet and abs(self.y + 1 - primary_ship.y - primary_ship.hurt.y_off) <= primary_ship.magnet then
|
||||
if (self.x < primary_ship.x + 3) self.x += 1
|
||||
if (self.x > primary_ship.x + 5) self.x -= 1
|
||||
if (self.y < primary_ship.y + 3) self.y += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user