Fixed remesh data race

This commit is contained in:
Joshua Barretto 2019-07-01 14:38:38 +01:00
parent 90566243ca
commit 586b62ea28

View File

@ -203,7 +203,7 @@ impl Terrain {
match self.mesh_todo.get(&response.pos) { match self.mesh_todo.get(&response.pos) {
// It's the mesh we want, insert the newly finished model into the terrain model // It's the mesh we want, insert the newly finished model into the terrain model
// data structure (convert the mesh to a model first of course). // data structure (convert the mesh to a model first of course).
Some(todo) if response.started_tick <= todo.started_tick => { Some(todo) if response.started_tick == todo.started_tick => {
self.chunks.insert( self.chunks.insert(
response.pos, response.pos,
TerrainChunk { TerrainChunk {