|
@@ -318,49 +318,49 @@ static void DisasterTick_UFO(Vehicle *v)
|
|
|
u->vehstatus |= VS_CRASHED;
|
|
|
|
|
|
AddNewsItem(STR_B001_ROAD_VEHICLE_DESTROYED,
|
|
|
NEWS_FLAGS(NM_THIN, NF_VIEWPORT|NF_VEHICLE, NT_ACCIDENT, 0),
|
|
|
u->index,
|
|
|
0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// destroy?
|
|
|
if (v->age > 50) {
|
|
|
CreateEffectVehicleRel(v, 0, 7, 8, EV_EXPLOSION_LARGE);
|
|
|
SndPlayVehicleFx(SND_12_EXPLOSION, v);
|
|
|
DeleteDisasterVeh(v);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static void DestructIndustry(Industry *i)
|
|
|
{
|
|
|
TileIndex tile;
|
|
|
|
|
|
for (tile = 0; tile != MapSize(); tile++) {
|
|
|
if (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == i->index) {
|
|
|
_m[tile].m1 = 0;
|
|
|
ResetIndustryConstructionStage(tile);
|
|
|
MarkTileDirtyByTile(tile);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Airplane which destroys an oil refinery
|
|
|
static void DisasterTick_2(Vehicle *v)
|
|
|
{
|
|
|
GetNewVehiclePosResult gp;
|
|
|
|
|
|
v->tick_counter++;
|
|
|
v->u.disaster.image_override =
|
|
|
(v->current_order.station == 1 && v->tick_counter & 4) ? SPR_F_15_FIRING : 0;
|
|
|
|
|
|
GetNewVehiclePos(v, &gp);
|
|
|
SetDisasterVehiclePos(v, gp.x, gp.y, v->z_pos);
|
|
|
|
|
|
if (gp.x < -160) {
|
|
|
DeleteDisasterVeh(v);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (v->current_order.station == 2) {
|
|
|
if (!(v->tick_counter&3)) {
|