equal
deleted
inserted
replaced
708 EngineID old_engine_type = GB(p2, 0, 16); |
708 EngineID old_engine_type = GB(p2, 0, 16); |
709 EngineID new_engine_type = GB(p2, 16, 16); |
709 EngineID new_engine_type = GB(p2, 16, 16); |
710 GroupID id_g = GB(p1, 16, 16); |
710 GroupID id_g = GB(p1, 16, 16); |
711 CommandCost cost; |
711 CommandCost cost; |
712 |
712 |
713 if (!IsValidGroupID(id_g) && !IsDefaultGroupID(id_g)) return CMD_ERROR; |
713 if (!IsValidGroupID(id_g) && !IsAllGroupID(id_g) && !IsDefaultGroupID(id_g)) return CMD_ERROR; |
714 if (new_engine_type != INVALID_ENGINE) { |
714 if (new_engine_type != INVALID_ENGINE) { |
715 /* First we make sure that it's a valid type the user requested |
715 /* First we make sure that it's a valid type the user requested |
716 * check that it's an engine that is in the engine array */ |
716 * check that it's an engine that is in the engine array */ |
717 if (!IsEngineIndex(new_engine_type)) |
717 if (!IsEngineIndex(new_engine_type)) |
718 return CMD_ERROR; |
718 return CMD_ERROR; |