From 6fe2b0b3b269d6d511d97c5ad71fda746d4f50ad Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 4 Nov 2007 11:46:01 +0000 Subject: (svn r11376) -Fix: fill the town a oil rig is associated with before creating the name, otherwise every oil rig will become " Oilrig" which effectively means that there can be several oil rigs with exactly the same name. --- src/station_cmd.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 664af247c..9bc18c759 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2759,14 +2759,16 @@ void BuildOilRig(TileIndex tile) DEBUG(misc, 0, "Can't allocate station for oilrig at 0x%X, reverting to oilrig only", tile); return; } + + st->town = ClosestTownFromTile(tile, (uint)-1); + st->sign.width_1 = 0; + if (!GenerateStationName(st, tile, STATIONNAMING_OILRIG)) { DEBUG(misc, 0, "Can't allocate station-name for oilrig at 0x%X, reverting to oilrig only", tile); + delete st; return; } - st->town = ClosestTownFromTile(tile, (uint)-1); - st->sign.width_1 = 0; - MakeOilrig(tile, st->index); st->owner = OWNER_NONE; -- cgit v1.2.3-54-g00ecf