MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / DecreaseVehicleValue

Function DecreaseVehicleValue

src/vehicle.cpp:1270–1274  ·  view source on GitHub ↗

* Decrease the value of a vehicle. * @param v %Vehicle to devaluate. */

Source from the content-addressed store, hash-verified

1268 * @param v %Vehicle to devaluate.
1269 */
1270void DecreaseVehicleValue(Vehicle *v)
1271{
1272 v->value -= v->value >> 8;
1273 SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
1274}
1275
1276static const uint8_t _breakdown_chance[64] = {
1277 3, 3, 3, 3, 3, 3, 3, 3,

Callers 4

OnNewEconomyDayMethod · 0.85
OnNewEconomyDayMethod · 0.85
OnNewEconomyDayMethod · 0.85
OnNewEconomyDayMethod · 0.85

Calls 1

SetWindowDirtyFunction · 0.85

Tested by

no test coverage detected