(svn r9902) -Fix (r9898): Don't check group owner when adding a vehicle to the 'default' group.

This commit is contained in:
peter1138 2007-05-23 14:02:10 +00:00
parent 35ce34d55a
commit c46ac94ce2
1 changed files with 4 additions and 2 deletions

View File

@ -205,8 +205,10 @@ int32 CmdAddVehicleGroup(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!IsValidVehicleID(p2) || (!IsValidGroupID(new_g) && !IsDefaultGroupID(new_g))) return CMD_ERROR;
Group *g = GetGroup(new_g);
if (g->owner != _current_player) return CMD_ERROR;
if (IsValidGroupID(new_g)) {
Group *g = GetGroup(new_g);
if (g->owner != _current_player) return CMD_ERROR;
}
Vehicle *v = GetVehicle(p2);
if (v->owner != _current_player || (v->type == VEH_TRAIN && !IsFrontEngine(v))) return CMD_ERROR;