File diff r21719:0f172a6b8939 → r21720:231348c28655
src/effectvehicle.cpp
Show inline comments
 
@@ -46,7 +46,7 @@ static bool ChimneySmokeTick(EffectVehic
 
			v->cur_image = SPR_CHIMNEY_SMOKE_0;
 
		}
 
		v->progress = 7;
 
		VehicleUpdatePositionAndViewport(v);
 
		v->UpdatePositionAndViewport();
 
	}
 

	
 
	return true;
 
@@ -79,7 +79,7 @@ static bool SteamSmokeTick(EffectVehicle
 
		moved = true;
 
	}
 

	
 
	if (moved) VehicleUpdatePositionAndViewport(v);
 
	if (moved) v->UpdatePositionAndViewport();
 

	
 
	return true;
 
}
 
@@ -96,11 +96,11 @@ static bool DieselSmokeTick(EffectVehicl
 

	
 
	if ((v->progress & 3) == 0) {
 
		v->z_pos++;
 
		VehicleUpdatePositionAndViewport(v);
 
		v->UpdatePositionAndViewport();
 
	} else if ((v->progress & 7) == 1) {
 
		if (v->cur_image != SPR_DIESEL_SMOKE_5) {
 
			v->cur_image++;
 
			VehicleUpdatePositionAndViewport(v);
 
			v->UpdatePositionAndViewport();
 
		} else {
 
			delete v;
 
			return false;
 
@@ -124,7 +124,7 @@ static bool ElectricSparkTick(EffectVehi
 
		v->progress = 0;
 
		if (v->cur_image != SPR_ELECTRIC_SPARK_5) {
 
			v->cur_image++;
 
			VehicleUpdatePositionAndViewport(v);
 
			v->UpdatePositionAndViewport();
 
		} else {
 
			delete v;
 
			return false;
 
@@ -161,7 +161,7 @@ static bool SmokeTick(EffectVehicle *v)
 
		moved = true;
 
	}
 

	
 
	if (moved) VehicleUpdatePositionAndViewport(v);
 
	if (moved) v->UpdatePositionAndViewport();
 

	
 
	return true;
 
}
 
@@ -178,7 +178,7 @@ static bool ExplosionLargeTick(EffectVeh
 
	if ((v->progress & 3) == 0) {
 
		if (v->cur_image != SPR_EXPLOSION_LARGE_F) {
 
			v->cur_image++;
 
			VehicleUpdatePositionAndViewport(v);
 
			v->UpdatePositionAndViewport();
 
		} else {
 
			delete v;
 
			return false;
 
@@ -203,7 +203,7 @@ static bool BreakdownSmokeTick(EffectVeh
 
		} else {
 
			v->cur_image = SPR_BREAKDOWN_SMOKE_0;
 
		}
 
		VehicleUpdatePositionAndViewport(v);
 
		v->UpdatePositionAndViewport();
 
	}
 

	
 
	v->animation_state--;
 
@@ -227,7 +227,7 @@ static bool ExplosionSmallTick(EffectVeh
 
	if ((v->progress & 3) == 0) {
 
		if (v->cur_image != SPR_EXPLOSION_SMALL_B) {
 
			v->cur_image++;
 
			VehicleUpdatePositionAndViewport(v);
 
			v->UpdatePositionAndViewport();
 
		} else {
 
			delete v;
 
			return false;
 
@@ -304,7 +304,7 @@ static bool BulldozerTick(EffectVehicle 
 
				return false;
 
			}
 
		}
 
		VehicleUpdatePositionAndViewport(v);
 
		v->UpdatePositionAndViewport();
 
	}
 

	
 
	return true;
 
@@ -477,7 +477,7 @@ static bool BubbleTick(EffectVehicle *v)
 
	if (v->spritenum == 0) {
 
		v->cur_image++;
 
		if (v->cur_image < SPR_BUBBLE_GENERATE_3) {
 
			VehicleUpdatePositionAndViewport(v);
 
			v->UpdatePositionAndViewport();
 
			return true;
 
		}
 
		if (v->animation_substate != 0) {
 
@@ -523,7 +523,7 @@ static bool BubbleTick(EffectVehicle *v)
 
	v->z_pos += b->z;
 
	v->cur_image = SPR_BUBBLE_0 + b->image;
 

	
 
	VehicleUpdatePositionAndViewport(v);
 
	v->UpdatePositionAndViewport();
 

	
 
	return true;
 
}
 
@@ -607,7 +607,7 @@ EffectVehicle *CreateEffectVehicle(int x
 

	
 
	_effect_init_procs[type](v);
 

	
 
	VehicleUpdatePositionAndViewport(v);
 
	v->UpdatePositionAndViewport();
 

	
 
	return v;
 
}