Codechange: strongly type IndustryID
This commit is contained in:
@@ -479,7 +479,7 @@ static bool DisasterTick_Aircraft(DisasterVehicle *v, uint16_t image_override, b
|
||||
if (!IsTileType(tile, MP_INDUSTRY)) return true;
|
||||
|
||||
IndustryID ind = GetIndustryIndex(tile);
|
||||
v->dest_tile = TileIndex{ind};
|
||||
v->dest_tile = TileIndex{ind.base()};
|
||||
|
||||
if (GetIndustrySpec(Industry::Get(ind)->type)->behaviour.Test(behaviour)) {
|
||||
v->state = 1;
|
||||
@@ -969,7 +969,7 @@ void ReleaseDisastersTargetingIndustry(IndustryID i)
|
||||
/* primary disaster vehicles that have chosen target */
|
||||
if (v->subtype == ST_AIRPLANE || v->subtype == ST_HELICOPTER) {
|
||||
/* if it has chosen target, and it is this industry (yes, dest_tile is IndustryID here), set order to "leaving map peacefully" */
|
||||
if (v->state > 0 && v->dest_tile == (uint32_t)i) v->state = 3;
|
||||
if (v->state > 0 && v->dest_tile == i.base()) v->state = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user