mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 23:30:41 +09:00
#61 fixed remoteMap deletions
This commit is contained in:
1 parent
a78a80f395
commit
52cc98cc95
2 files changed
+7
-2
No files matched your search
+6
-1
@@ -167,7 +167,12 @@ function drawEntity(entity, dontCache){
|
||||
if(!dontCache){
|
||||
// cache entity for later draws (like panning)
|
||||
if(entity.x - playerPosition.x/16 >= 0 && entity.x - playerPosition.x/16 < 64 && entity.y - playerPosition.y/16 >= 0 && entity.y - playerPosition.y/16 < 64){
|
||||
entityCache[entity.x - playerPosition.x/16][entity.y - playerPosition.y/16] = entity;
|
||||
if(entity.entity){
|
||||
entityCache[entity.x - playerPosition.x/16][entity.y - playerPosition.y/16] = entity;
|
||||
} else {
|
||||
// delete this entity because we just heard the tile is empty and stuff
|
||||
entityCache[entity.x - playerPosition.x/16][entity.y - playerPosition.y/16] = " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.entity && entity.entity.name && typeof entity.entity.name == "string"){
|
||||
|
||||
Reference in new issue
Block a user