mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
Fixed remoteMap not deleting things properly
This commit is contained in:
1 parent
72d5f06381
commit
cde0d3265b
1 file changed
+1
-2
+1
-2
@@ -109,7 +109,6 @@ Mousetrap.bind("s", e => {
|
||||
console.log("s");
|
||||
cache.walkUp();
|
||||
playerPosition.y += remoteMapConfig.tileSize;
|
||||
console.log(remoteMapConfig)
|
||||
clear();drawFromCache();
|
||||
});
|
||||
Mousetrap.bind("d", e => {
|
||||
@@ -300,7 +299,7 @@ function drawEntity(entity, dontCache){
|
||||
} else {
|
||||
// we got an empty coordinate pair, that usually means this tile was occupied before but is empty now
|
||||
console.log("Clearing at X: "+entity.x+", Y: "+entity.y);
|
||||
ctx.clearRect(entity.x * remoteMapConfig.tileSize, entity.y * remoteMapConfig.tileSize, remoteMapConfig.tileSize, remoteMapConfig.tileSize);
|
||||
ctx.clearRect((entity.x + playerPosition.x/remoteMapConfig.tileSize) * remoteMapConfig.tileSize, (entity.y + playerPosition.y/remoteMapConfig.tileSize) * remoteMapConfig.tileSize, remoteMapConfig.tileSize, remoteMapConfig.tileSize);
|
||||
}
|
||||
} else {
|
||||
console.log(entity);
|
||||
|
||||
Reference in new issue
Block a user