Made sure items equip themselves within the SpriteBoss, too.

This commit is contained in:
Nick Winter 2014-08-05 21:47:51 -07:00
parent eceac0bbc9
commit 74283bafed

View file

@ -181,6 +181,7 @@ module.exports = class SpriteBoss extends CocoClass
# Add anything new, remove anything old, update everything current
updateCache = false
for thang in @world.thangs when thang.exists
thang.equip() if thang.equip and not thang.equipped # Pretty hacky, since initialize may not be called
if sprite = @sprites[thang.id]
sprite.setThang thang # make sure Sprite has latest Thang
else