File diff r14848:8e2ba5b203eb → r14849:27386629fac1
src/disaster_cmd.cpp
Show inline comments
 
@@ -231,13 +231,13 @@ static bool DisasterTick_Zeppeliner(Disa
 

	
 
	if (v->current_order.GetDestination() > 2) {
 
		if (++v->age <= 13320) return true;
 

	
 
		if (IsValidTile(v->tile) && IsAirportTile(v->tile)) {
 
			Station *st = Station::GetByTile(v->tile);
 
			CLRBITS(st->airport_flags, RUNWAY_IN_block);
 
			CLRBITS(st->airport.flags, RUNWAY_IN_block);
 
			AI::NewEvent(GetTileOwner(v->tile), new AIEventDisasterZeppelinerCleared(st->index));
 
		}
 

	
 
		SetDisasterVehiclePos(v, v->x_pos, v->y_pos, v->z_pos);
 
		delete v;
 
		return false;
 
@@ -268,13 +268,13 @@ static bool DisasterTick_Zeppeliner(Disa
 
	} else if (v->age == 350) {
 
		v->current_order.SetDestination(3);
 
		v->age = 0;
 
	}
 

	
 
	if (IsValidTile(v->tile) && IsAirportTile(v->tile)) {
 
		SETBITS(Station::GetByTile(v->tile)->airport_flags, RUNWAY_IN_block);
 
		SETBITS(Station::GetByTile(v->tile)->airport.flags, RUNWAY_IN_block);
 
	}
 

	
 
	return true;
 
}
 

	
 
/**
 
@@ -677,13 +677,13 @@ static void Disaster_Zeppeliner_Init()
 

	
 
	/* Pick a random place, unless we find a small airport */
 
	int x = TileX(Random()) * TILE_SIZE + TILE_SIZE / 2;
 

	
 
	Station *st;
 
	FOR_ALL_STATIONS(st) {
 
		if (st->airport.tile != INVALID_TILE && (st->airport_type == AT_SMALL || st->airport_type == AT_LARGE)) {
 
		if (st->airport.tile != INVALID_TILE && (st->airport.type == AT_SMALL || st->airport.type == AT_LARGE)) {
 
			x = (TileX(st->airport.tile) + 2) * TILE_SIZE;
 
			break;
 
		}
 
	}
 

	
 
	DisasterVehicle *v = new DisasterVehicle();