Skip to content

Commit ef29721

Browse files
committed
Always snap buildings to center of tile to avoid visual glitches with mods
1 parent 8a19b89 commit ef29721

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/game/ObjectListLoader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export class ObjectListLoader {
9090
case EntityType.ORE_REFINERY:
9191
case EntityType.GUNSTATION:
9292
case EntityType.TELEPORT_BIG:
93+
worldPos.divideScalar(TILESIZE).roundToZero().add({x: 0.5, y: 0.5}).multiplyScalar(TILESIZE) // Always snap building position to the center of the given tile
9394
const building = new BuildingEntity(this.worldMgr, entityType, worldPos, -headingRad - Math.PI, this.disableStartTeleport)
9495
if (entityType === EntityType.TOOLSTATION) {
9596
if (!this.trackEntity && building.sceneEntity.visible) this.trackEntity = building.entity

0 commit comments

Comments
 (0)