mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-18 21:18:10 +00:00
(svn r8874) [0.5] -Backport from trunk (r8744, r8685):
- Call GetFirstVehicleInChain only for trains thus increasing performance in large games (r8744) - (Feature) Selecting "end of orders" and deleting will delete all the vehicle's orders (in unshared mode, shared is unchanged) (r8685)
This commit is contained in:
parent
1cdfa87b21
commit
3b2bcbf0f0
@ -1031,7 +1031,7 @@ static void DoTriggerVehicle(Vehicle *v, VehicleTrigger trigger, byte base_rando
|
||||
* i.e.), so we give them all the NEW_CARGO triggered
|
||||
* vehicle's portion of random bits. */
|
||||
assert(first);
|
||||
DoTriggerVehicle(GetFirstVehicleInChain(v), VEHICLE_TRIGGER_ANY_NEW_CARGO, new_random_bits, false);
|
||||
DoTriggerVehicle((v->type == VEH_Train) ? GetFirstVehicleInChain(v) : v, VEHICLE_TRIGGER_ANY_NEW_CARGO, new_random_bits, false);
|
||||
break;
|
||||
|
||||
case VEHICLE_TRIGGER_DEPOT:
|
||||
|
@ -76,7 +76,7 @@ static void DrawOrdersWindow(Window *w)
|
||||
|
||||
/* delete */
|
||||
SetWindowWidgetDisabledState(w, 5,
|
||||
(uint)v->num_orders + (shared_orders ? 1 : 0) <= (uint)WP(w, order_d).sel);
|
||||
(uint)v->num_orders + ((shared_orders || v->num_orders != 0) ? 1 : 0) <= (uint)WP(w, order_d).sel);
|
||||
|
||||
/* non-stop only for trains */
|
||||
SetWindowWidgetDisabledState(w, 6, v->type != VEH_Train || order == NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user