Tweaked the world to return points that are not 0,0, as that's what the world reports non-existent thangs at.

This commit is contained in:
Scott Erickson 2014-02-07 11:49:16 -08:00
parent c3bd9cef80
commit 72b1b989d8

View file

@ -420,7 +420,7 @@ module.exports = class World
pos = camera.worldToSurface {x: pos.x, y: pos.y} if camera # without z
if not lastPos.x? or (Math.abs(lastPos.x - pos.x) + Math.abs(lastPos.y - pos.y)) > 1
lastPos = pos
allPoints.push lastPos.y, lastPos.x
allPoints.push lastPos.y, lastPos.x unless lastPos.y is 0 and lastPos.x is 0
allPoints.reverse()
@pointsForThangCache[cacheKey] = allPoints