Do not update viewport signs when running headlessly

This commit is contained in:
Jonathan G Rennison
2024-01-22 23:22:09 +00:00
parent 04e47eca9a
commit ced17a74e8
6 changed files with 9 additions and 1 deletions

View File

@@ -508,6 +508,7 @@ void Station::UpdateCargoHistory()
*/
void Station::UpdateVirtCoord()
{
if (IsHeadless()) return;
Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
pt.y -= 32 * ZOOM_LVL_BASE;
@@ -546,6 +547,7 @@ void Station::MoveSign(TileIndex new_xy)
/** Update the virtual coords needed to draw the station sign for all stations. */
void UpdateAllStationVirtCoords()
{
if (IsHeadless()) return;
for (BaseStation *st : BaseStation::Iterate()) {
st->UpdateVirtCoord();
}