branch | NewGRF_ports |
changeset 10274 | b3c58f3df92b |
parent 10242 | 52b4a9006029 |
child 10724 | 68a692eacf22 |
10243:e9066a148720 | 10274:b3c58f3df92b |
---|---|
40 #include "gfx_func.h" |
40 #include "gfx_func.h" |
41 #include "settings_type.h" |
41 #include "settings_type.h" |
42 #include "order_func.h" |
42 #include "order_func.h" |
43 #include "depot_base.h" |
43 #include "depot_base.h" |
44 #include "depot_func.h" |
44 #include "depot_func.h" |
45 #include "effectvehicle_func.h" |
|
45 |
46 |
46 #include "table/strings.h" |
47 #include "table/strings.h" |
47 |
48 |
48 static const uint16 _roadveh_images[63] = { |
49 static const uint16 _roadveh_images[63] = { |
49 0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14, |
50 0xCD4, 0xCDC, 0xCE4, 0xCEC, 0xCF4, 0xCFC, 0xD0C, 0xD14, |
702 SND_0F_VEHICLE_BREAKDOWN : SND_35_COMEDY_BREAKDOWN, v); |
703 SND_0F_VEHICLE_BREAKDOWN : SND_35_COMEDY_BREAKDOWN, v); |
703 } |
704 } |
704 |
705 |
705 if (!(v->vehstatus & VS_HIDDEN)) { |
706 if (!(v->vehstatus & VS_HIDDEN)) { |
706 Vehicle *u = CreateEffectVehicleRel(v, 4, 4, 5, EV_BREAKDOWN_SMOKE); |
707 Vehicle *u = CreateEffectVehicleRel(v, 4, 4, 5, EV_BREAKDOWN_SMOKE); |
707 if (u != NULL) u->u.special.animation_state = v->breakdown_delay * 2; |
708 if (u != NULL) u->u.effect.animation_state = v->breakdown_delay * 2; |
708 } |
709 } |
709 } |
710 } |
710 |
711 |
711 if ((v->tick_counter & 1) == 0) { |
712 if ((v->tick_counter & 1) == 0) { |
712 if (--v->breakdown_delay == 0) { |
713 if (--v->breakdown_delay == 0) { |
1842 if (v->breakdown_ctr != 0) { |
1843 if (v->breakdown_ctr != 0) { |
1843 if (v->breakdown_ctr <= 2) { |
1844 if (v->breakdown_ctr <= 2) { |
1844 HandleBrokenRoadVeh(v); |
1845 HandleBrokenRoadVeh(v); |
1845 return; |
1846 return; |
1846 } |
1847 } |
1847 v->breakdown_ctr--; |
1848 if (!v->current_order.IsType(OT_LOADING)) v->breakdown_ctr--; |
1848 } |
1849 } |
1849 |
1850 |
1850 if (v->vehstatus & VS_STOPPED) return; |
1851 if (v->vehstatus & VS_STOPPED) return; |
1851 |
1852 |
1852 ProcessOrders(v); |
1853 ProcessOrders(v); |