mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-25 15:39:09 +00:00
Codechange: Add AssignBit function to assign the value of a single bit (#12934)
* Codechange: Add AssignBit function to assign the value of a single bit * Codechange: Replace various uses of SB with AssignBit * Codechange: Replace various uses of SB with a constant with SetBit
This commit is contained in:
committed by
GitHub
parent
27efa57b7b
commit
e477706bf5
@@ -674,11 +674,11 @@ CommandCost CmdSetGroupLivery(DoCommandFlag flags, GroupID group_id, bool primar
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
if (primary) {
|
||||
SB(g->livery.in_use, 0, 1, colour != INVALID_COLOUR);
|
||||
AssignBit(g->livery.in_use, 0, colour != INVALID_COLOUR);
|
||||
if (colour == INVALID_COLOUR) colour = GetParentLivery(g)->colour1;
|
||||
g->livery.colour1 = colour;
|
||||
} else {
|
||||
SB(g->livery.in_use, 1, 1, colour != INVALID_COLOUR);
|
||||
AssignBit(g->livery.in_use, 1, colour != INVALID_COLOUR);
|
||||
if (colour == INVALID_COLOUR) colour = GetParentLivery(g)->colour2;
|
||||
g->livery.colour2 = colour;
|
||||
}
|
||||
|
Reference in New Issue
Block a user