Skip to content

Commit 9bc069e

Browse files
committed
bounding order fixes
1 parent 23defe0 commit 9bc069e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/client/scripts/World/World.coffee

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,12 @@ class World
208208
type:"genCellGeo"
209209
data:[cellX,cellY,cellZ]
210210
}
211+
211212
_updateCellsAroundPlayer: (radius)->
213+
pos=@game.camera.position
214+
cell=@cellTerrain.computeCellForVoxel (Math.floor pos.x+0.5),(Math.floor pos.y+0.5),(Math.floor pos.z+0.5)
215+
@updateRenderOrder cell
212216
if @cellUpdateTime isnt null and (performance.now()-@cellUpdateTime>@renderTime)
213-
pos=@game.camera.position
214-
cell=@cellTerrain.computeCellForVoxel (Math.floor pos.x),(Math.floor pos.y),(Math.floor pos.z)
215-
@updateRenderOrder cell
216217
@chunkWorker.postMessage {
217218
type:"updateCellsAroundPlayer"
218219
data:[cell,radius]

0 commit comments

Comments
 (0)