(svn r24124) -Add [FS#4658]: [NewGRF] Misc engine flag to disable breakdown smoke. (Hirundo)

This commit is contained in:
michi_cc 2012-04-17 19:43:04 +00:00
parent d3c6130f3f
commit bb8506032e
2 changed files with 2 additions and 1 deletions

View File

@ -157,6 +157,7 @@ enum EngineMiscFlags {
EF_RAIL_FLIPS = 3, ///< Rail vehicle can be flipped in the depot EF_RAIL_FLIPS = 3, ///< Rail vehicle can be flipped in the depot
EF_AUTO_REFIT = 4, ///< Automatic refitting is allowed EF_AUTO_REFIT = 4, ///< Automatic refitting is allowed
EF_NO_DEFAULT_CARGO_MULTIPLIER = 5, ///< Use the new capacity algorithm. The default cargotype of the vehicle does not affect capacity multipliers. CB 15 is also called in purchase list. EF_NO_DEFAULT_CARGO_MULTIPLIER = 5, ///< Use the new capacity algorithm. The default cargotype of the vehicle does not affect capacity multipliers. CB 15 is also called in purchase list.
EF_NO_BREAKDOWN_SMOKE = 6, ///< Do not show black smoke during a breakdown.
}; };
/** /**

View File

@ -1146,7 +1146,7 @@ bool Vehicle::HandleBreakdown()
(this->type == VEH_TRAIN ? SND_3A_COMEDY_BREAKDOWN_2 : SND_35_COMEDY_BREAKDOWN), this); (this->type == VEH_TRAIN ? 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); EffectVehicle *u = CreateEffectVehicleRel(this, 4, 4, 5, EV_BREAKDOWN_SMOKE);
if (u != NULL) u->animation_state = this->breakdown_delay * 2; if (u != NULL) u->animation_state = this->breakdown_delay * 2;
} }