File diff r14159:6cb75763eb03 → r14160:24d7cfd54d1c
src/newgrf_station.cpp
Show inline comments
 
@@ -834,13 +834,13 @@ void DeallocateSpecFromStation(BaseStati
 
{
 
	/* specindex of 0 (default) is never freeable */
 
	if (specindex == 0) return;
 

	
 
	ETileArea area = ETileArea(st, INVALID_TILE, TA_WHOLE);
 
	/* Check all tiles over the station to check if the specindex is still in use */
 
	TILE_LOOP(tile, area.w, area.h, area.tile) {
 
	TILE_AREA_LOOP(tile, area) {
 
		if (st->TileBelongsToRailStation(tile) && GetCustomStationSpecIndex(tile) == specindex) {
 
			return;
 
		}
 
	}
 

	
 
	/* This specindex is no longer in use, so deallocate it */
 
@@ -1073,13 +1073,13 @@ void StationAnimationTrigger(const BaseS
 
	if (!HasBit(st->cached_anim_triggers, trigger)) return;
 

	
 
	uint16 random_bits = Random();
 
	ETileArea area = ETileArea(st, tile, tas[trigger]);
 

	
 
	/* Check all tiles over the station to check if the specindex is still in use */
 
	TILE_LOOP(tile, area.w, area.h, area.tile) {
 
	TILE_AREA_LOOP(tile, area) {
 
		if (st->TileBelongsToRailStation(tile)) {
 
			const StationSpec *ss = GetStationSpec(tile);
 
			if (ss != NULL && HasBit(ss->anim_triggers, trigger)) {
 
				CargoID cargo;
 
				if (cargo_type == CT_INVALID) {
 
					cargo = CT_INVALID;