Permalink
Browse files

properly copied ship.entities in ship.new()

  • Loading branch information...
1 parent 3584cfd commit 283b970ec75f10d1fb442d3ba77c7a9e8fb2384d @Textmode Textmode committed Aug 28, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 ship.lua
View
@@ -22,7 +22,10 @@ function ship.new(t)
e.npc = (t.npc == nil and true) or t.npc
e.dir_timer = t.dir_timer or 0
- e.entities = t.entities or {}
+ e.entities = {}
+ for k, v in pairs(t.entities or {}) do
+ e.entities[k] = v.new(v)
+ end
e.hit = false -- was hit by player?
e.shooting = false

0 comments on commit 283b970

Please sign in to comment.