|
|
|
@ -1351,7 +1351,7 @@ bool Vehicle::HandleBreakdown()
|
|
|
|
|
(train_or_ship ? SND_10_TRAIN_BREAKDOWN : SND_0F_VEHICLE_BREAKDOWN) :
|
|
|
|
|
(train_or_ship ? SND_3A_COMEDY_BREAKDOWN_2 : SND_35_COMEDY_BREAKDOWN), this);
|
|
|
|
|
}
|
|
|
|
|
if (!(this->vehstatus & VS_HIDDEN)) {
|
|
|
|
|
if (!(this->vehstatus & VS_HIDDEN) && !HasBit(EngInfo(this->engine_type)->misc_flags, EF_NO_BREAKDOWN_SMOKE)) {
|
|
|
|
|
EffectVehicle *u = CreateEffectVehicleRel(this, 4, 4, 5, EV_BREAKDOWN_SMOKE);
|
|
|
|
|
if (u != NULL) u->animation_state = this->breakdown_delay * 2;
|
|
|
|
|
}
|
|
|
|
@ -1391,7 +1391,8 @@ bool Vehicle::HandleBreakdown()
|
|
|
|
|
SetBit(Train::From(this)->flags, VRF_BREAKDOWN_BRAKING);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ((!(this->vehstatus & VS_HIDDEN)) && ((this->breakdown_type == BREAKDOWN_LOW_SPEED || this->breakdown_type == BREAKDOWN_LOW_POWER) && (this->tick_counter & 0x1F) == 0)) {
|
|
|
|
|
if ((!(this->vehstatus & VS_HIDDEN)) && ((this->breakdown_type == BREAKDOWN_LOW_SPEED || this->breakdown_type == BREAKDOWN_LOW_POWER) && (this->tick_counter & 0x1F) == 0)
|
|
|
|
|
&& !HasBit(EngInfo(this->engine_type)->misc_flags, EF_NO_BREAKDOWN_SMOKE)) {
|
|
|
|
|
CreateEffectVehicleRel(this, 0, 0, 2, EV_BREAKDOWN_SMOKE); //some grey clouds to indicate a broken engine
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
@ -1400,7 +1401,7 @@ bool Vehicle::HandleBreakdown()
|
|
|
|
|
if (!PlayVehicleSound(this, VSE_BREAKDOWN)) {
|
|
|
|
|
SndPlayVehicleFx((_settings_game.game_creation.landscape != LT_TOYLAND) ? SND_0F_VEHICLE_BREAKDOWN : SND_35_COMEDY_BREAKDOWN, this);
|
|
|
|
|
}
|
|
|
|
|
if (!(this->vehstatus & VS_HIDDEN)) {
|
|
|
|
|
if (!(this->vehstatus & VS_HIDDEN) && !HasBit(EngInfo(this->engine_type)->misc_flags, EF_NO_BREAKDOWN_SMOKE)) {
|
|
|
|
|
EffectVehicle *u = CreateEffectVehicleRel(this, 4, 4, 5, EV_BREAKDOWN_SMOKE);
|
|
|
|
|
if (u != NULL) u->animation_state = this->breakdown_delay * 2;
|
|
|
|
|
}
|
|
|
|
|