equal
deleted
inserted
replaced
318 |
318 |
319 static bool HandleOrderVehClick(const Vehicle *v, const Vehicle *u, Window *w) |
319 static bool HandleOrderVehClick(const Vehicle *v, const Vehicle *u, Window *w) |
320 { |
320 { |
321 if (u->type != v->type) return false; |
321 if (u->type != v->type) return false; |
322 |
322 |
323 if (u->type == VEH_TRAIN && !IsFrontEngine(u)) { |
323 if (u->HasFront() && !u->IsPrimaryVehicle()) { |
324 u = GetFirstVehicleInChain(u); |
324 u = GetFirstVehicleInChain(u); |
325 if (!IsFrontEngine(u)) return false; |
325 if (!u->IsPrimaryVehicle()) return false; |
326 } |
326 } |
327 |
327 |
328 // v is vehicle getting orders. Only copy/clone orders if vehicle doesn't have any orders yet |
328 // v is vehicle getting orders. Only copy/clone orders if vehicle doesn't have any orders yet |
329 // obviously if you press CTRL on a non-empty orders vehicle you know what you are doing |
329 // obviously if you press CTRL on a non-empty orders vehicle you know what you are doing |
330 if (v->num_orders != 0 && _ctrl_pressed == 0) return false; |
330 if (v->num_orders != 0 && _ctrl_pressed == 0) return false; |