Changeset - r7826:ba52dfd1b32d
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-11-04 11:46:01
rubidium@openttd.org
(svn r11376) -Fix: fill the town a oil rig is associated with before creating the name, otherwise every oil rig will become "<TOWN> Oilrig" which effectively means that there can be several oil rigs with exactly the same name.
1 file changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -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;
 
	}
 
	if (!GenerateStationName(st, tile, STATIONNAMING_OILRIG)) {
 
		DEBUG(misc, 0, "Can't allocate station-name 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;
 
	}
 

	
 
	MakeOilrig(tile, st->index);
 

	
 
	st->owner = OWNER_NONE;
0 comments (0 inline, 0 general)