mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fixed rotated levers not being rendered correctly
This commit is contained in:
parent
e04fcceecc
commit
5076c03dab
@ -37,14 +37,7 @@ export class LeverSystem extends GameSystemWithFilter {
|
|||||||
const leverComp = entity.components.Lever;
|
const leverComp = entity.components.Lever;
|
||||||
if (leverComp) {
|
if (leverComp) {
|
||||||
const sprite = leverComp.toggled ? this.spriteOn : this.spriteOff;
|
const sprite = leverComp.toggled ? this.spriteOn : this.spriteOff;
|
||||||
const origin = entity.components.StaticMapEntity.origin;
|
entity.components.StaticMapEntity.drawSpriteOnBoundsClipped(parameters, sprite);
|
||||||
sprite.drawCached(
|
|
||||||
parameters,
|
|
||||||
origin.x * globalConfig.tileSize,
|
|
||||||
origin.y * globalConfig.tileSize,
|
|
||||||
globalConfig.tileSize,
|
|
||||||
globalConfig.tileSize
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user