1
0
Fork 0

Fix #7224: Drag and drop vehicle group creation does not work correctly.

When drag and drop a vehicle into an empty slot in the vehicle group window it tries to create the new group as the subgroup of the first group (GroupID = 0). This is failing if the dragged vehicle's type is different than the first group's vehicle type.
pull/7676/head
stormcone 2019-05-10 19:19:07 +02:00 committed by Michael Lutz
parent 9dded61af9
commit 9239381d56
1 changed files with 1 additions and 1 deletions

View File

@ -536,7 +536,7 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u
if (new_g == NEW_GROUP) { if (new_g == NEW_GROUP) {
/* Create new group. */ /* Create new group. */
CommandCost ret = CmdCreateGroup(0, flags, v->type, 0, NULL); CommandCost ret = CmdCreateGroup(0, flags, v->type, INVALID_GROUP, NULL);
if (ret.Failed()) return ret; if (ret.Failed()) return ret;
new_g = _new_group_id; new_g = _new_group_id;