Skip to content

Commit b25bc87

Browse files
committed
Fix weird delivery point placement for cyborg factories and repair facilities.
Changelog: Fixed delivery point placement for cyborg factories and repair facilities.
1 parent da4a6ea commit b25bc87

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/structure.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,8 +2076,8 @@ BOOL setFunctionality(STRUCTURE *psBuilding, STRUCTURE_TYPE functionType)
20762076
}
20772077

20782078
// initialise the assembly point position
2079-
x = map_coord(psBuilding->pos.x + 256);
2080-
y = map_coord(psBuilding->pos.y + 256);
2079+
x = map_coord(psBuilding->pos.x + (psBuilding->pStructureType->baseWidth + 1) * TILE_UNITS/2);
2080+
y = map_coord(psBuilding->pos.y + (psBuilding->pStructureType->baseBreadth + 1) * TILE_UNITS/2);
20812081

20822082
// Set the assembly point
20832083
setAssemblyPoint(psFactory->psAssemblyPoint, world_coord(x), world_coord(y), psBuilding->player, true);
@@ -2172,8 +2172,8 @@ BOOL setFunctionality(STRUCTURE *psBuilding, STRUCTURE_TYPE functionType)
21722172
}
21732173

21742174
// Initialise the assembly point
2175-
x = map_coord(psBuilding->pos.x+256);
2176-
y = map_coord(psBuilding->pos.y+256);
2175+
x = map_coord(psBuilding->pos.x + (psBuilding->pStructureType->baseWidth + 1) * TILE_UNITS/2);
2176+
y = map_coord(psBuilding->pos.y + (psBuilding->pStructureType->baseBreadth + 1) * TILE_UNITS/2);
21772177

21782178
// Set the assembly point
21792179
setAssemblyPoint(psRepairFac->psDeliveryPoint, world_coord(x),

0 commit comments

Comments
 (0)