File diff r24577:426d8b219586 → r24578:e105ade320f5
src/disaster_vehicle.cpp
Show inline comments
 
@@ -240,13 +240,13 @@ static bool DisasterTick_Zeppeliner(Disa
 
		} else if (v->current_order.GetDestination() == 0) {
 
			if (IsValidTile(v->tile) && IsAirportTile(v->tile)) {
 
				v->current_order.SetDestination(1);
 
				v->age = 0;
 

	
 
				SetDParam(0, GetStationIndex(v->tile));
 
				AddVehicleNewsItem(STR_NEWS_DISASTER_ZEPPELIN, NT_ACCIDENT, v->index); // Delete the news, when the zeppelin is gone
 
				AddTileNewsItem(STR_NEWS_DISASTER_ZEPPELIN, NT_ACCIDENT, v->tile);
 
				AI::NewEvent(GetTileOwner(v->tile), new ScriptEventDisasterZeppelinerCrashed(GetStationIndex(v->tile)));
 
			}
 
		}
 

	
 
		if (v->y_pos >= (int)((MapSizeY() + 9) * TILE_SIZE - 1)) {
 
			delete v;
 
@@ -374,13 +374,13 @@ static bool DisasterTick_Ufo(DisasterVeh
 

	
 
		if (z <= u->z_pos && (u->vehstatus & VS_HIDDEN) == 0) {
 
			v->age++;
 
			if (u->crashed_ctr == 0) {
 
				u->Crash();
 

	
 
				AddVehicleNewsItem(STR_NEWS_DISASTER_SMALL_UFO, NT_ACCIDENT, u->index); // delete the news, when the roadvehicle is gone
 
				AddTileNewsItem(STR_NEWS_DISASTER_SMALL_UFO, NT_ACCIDENT, u->tile);
 

	
 
				AI::NewEvent(u->owner, new ScriptEventVehicleCrashed(u->index, u->tile, ScriptEventVehicleCrashed::CRASH_RV_UFO));
 
				Game::NewEvent(new ScriptEventVehicleCrashed(u->index, u->tile, ScriptEventVehicleCrashed::CRASH_RV_UFO));
 
			}
 
		}
 

	
 
@@ -453,13 +453,13 @@ static bool DisasterTick_Aircraft(Disast
 
			v->age = 0;
 

	
 
			Industry *i = Industry::Get(v->dest_tile); // Industry destructor calls ReleaseDisastersTargetingIndustry, so this is valid
 
			DestructIndustry(i);
 

	
 
			SetDParam(0, i->town->index);
 
			AddIndustryNewsItem(news_message, NT_ACCIDENT, i->index); // delete the news, when the industry closes
 
			AddTileNewsItem(news_message, NT_ACCIDENT, v->dest_tile);
 
			if (_settings_client.sound.disaster) SndPlayTileFx(SND_12_EXPLOSION, i->location.tile);
 
		}
 
	} else if (v->current_order.GetDestination() == 0) {
 
		int x = v->x_pos + ((leave_at_top ? -15 : 15) * TILE_SIZE);
 
		int y = v->y_pos;