mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r9882) -Fix (r9874): the "default group" is also a valid group in some cases.
This commit is contained in:
parent
6ef7915e6e
commit
821c0acf4d
@ -181,7 +181,7 @@ int32 CmdAddVehicleGroup(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||
{
|
||||
GroupID new_g = p1;
|
||||
|
||||
if (!IsValidVehicleID(p2) || !IsValidGroupID(new_g)) return CMD_ERROR;
|
||||
if (!IsValidVehicleID(p2) || (!IsValidGroupID(new_g) && !IsDefaultGroupID(new_g))) return CMD_ERROR;
|
||||
|
||||
Vehicle *v = GetVehicle(p2);
|
||||
if (v->owner != _current_player || (v->type == VEH_TRAIN && !IsFrontEngine(v))) return CMD_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user