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:
parent
c3bd9cef80
commit
72b1b989d8
1 changed files with 1 additions and 1 deletions
|
@ -420,7 +420,7 @@ module.exports = class World
|
||||||
pos = camera.worldToSurface {x: pos.x, y: pos.y} if camera # without z
|
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
|
if not lastPos.x? or (Math.abs(lastPos.x - pos.x) + Math.abs(lastPos.y - pos.y)) > 1
|
||||||
lastPos = pos
|
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()
|
allPoints.reverse()
|
||||||
@pointsForThangCache[cacheKey] = allPoints
|
@pointsForThangCache[cacheKey] = allPoints
|
||||||
|
|
||||||
|
|
Reference in a new issue