Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug (killing ships not awarding points)

Fixes bugs introduced in efb1265 and 165716
  • Loading branch information...
commit 0bec219840032851b9741cc43afc623a202e3a09 1 parent 507c8f2
@JustAPerson JustAPerson authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 ship.lua
View
4 ship.lua
@@ -87,6 +87,8 @@ function ship:update(dt, level)
entity:collidewith(ship)
entity.state = 'remove'
self.entities[i] = nil
+
+ ship.hit = true
end
end
@@ -164,7 +166,7 @@ function ship:die()
if self.npc then
if self.hit then -- Was the NPC hit by the player?
- Gamestate.space.score = Gamestate.space.score + 25
+ Gamestate.space.player.score = Gamestate.space.player.score + 25
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.