|
|
|
@ -466,10 +466,11 @@ CommandCost CmdAlterGroup(DoCommandFlag flags, AlterGroupMode mode, GroupID grou
|
|
|
|
|
g->parent = (pg == nullptr) ? INVALID_GROUP : pg->index;
|
|
|
|
|
GroupStatistics::UpdateAutoreplace(g->owner);
|
|
|
|
|
|
|
|
|
|
if (g->livery.in_use == 0) {
|
|
|
|
|
if (!HasBit(g->livery.in_use, 0) || !HasBit(g->livery.in_use, 1)) {
|
|
|
|
|
/* Update livery with new parent's colours if either colour is default. */
|
|
|
|
|
const Livery *livery = GetParentLivery(g);
|
|
|
|
|
g->livery.colour1 = livery->colour1;
|
|
|
|
|
g->livery.colour2 = livery->colour2;
|
|
|
|
|
if (!HasBit(g->livery.in_use, 0)) g->livery.colour1 = livery->colour1;
|
|
|
|
|
if (!HasBit(g->livery.in_use, 1)) g->livery.colour2 = livery->colour2;
|
|
|
|
|
|
|
|
|
|
PropagateChildLivery(g, true);
|
|
|
|
|
MarkWholeScreenDirty();
|
|
|
|
|