mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +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");
|
console.log("s");
|
||||||
cache.walkUp();
|
cache.walkUp();
|
||||||
playerPosition.y += remoteMapConfig.tileSize;
|
playerPosition.y += remoteMapConfig.tileSize;
|
||||||
console.log(remoteMapConfig)
|
|
||||||
clear();drawFromCache();
|
clear();drawFromCache();
|
||||||
});
|
});
|
||||||
Mousetrap.bind("d", e => {
|
Mousetrap.bind("d", e => {
|
||||||
@@ -300,7 +299,7 @@ function drawEntity(entity, dontCache){
|
|||||||
} else {
|
} else {
|
||||||
// we got an empty coordinate pair, that usually means this tile was occupied before but is empty now
|
// 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);
|
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 {
|
} else {
|
||||||
console.log(entity);
|
console.log(entity);
|
||||||
|
|||||||
Reference in new issue
Block a user