equal
deleted
inserted
replaced
352 * @note Called in CmdSellRailWagon and DeleteLasWagon, |
352 * @note Called in CmdSellRailWagon and DeleteLasWagon, |
353 * @param v FrontEngine of the train we want to remove. |
353 * @param v FrontEngine of the train we want to remove. |
354 */ |
354 */ |
355 void RemoveVehicleFromGroup(const Vehicle *v) |
355 void RemoveVehicleFromGroup(const Vehicle *v) |
356 { |
356 { |
357 if (!v->IsValid() || !(v->HasFront() && v->IsPrimaryVehicle())) return; |
357 if (!v->IsValid() || !v->IsPrimaryVehicle()) return; |
358 |
358 |
359 if (!IsDefaultGroupID(v->group_id)) DecreaseGroupNumVehicle(v->group_id); |
359 if (!IsDefaultGroupID(v->group_id)) DecreaseGroupNumVehicle(v->group_id); |
360 } |
360 } |
361 |
361 |
362 |
362 |