VarAction2: Fix applying station layout reg bits to multiple sprite groups

See: #479
This commit is contained in:
Jonathan G Rennison
2023-01-29 14:53:27 +00:00
parent f3645cf629
commit 87f8e56534

View File

@@ -3003,9 +3003,10 @@ static void PopulateRailStationAdvancedLayoutVariableUsage()
}
if (bits.any()) {
/* Simulate a procedure call on each of the root sprite groups which requires the bits used in the tile layouts */
CheckDeterministicSpriteGroupOutputVarBitsProcedureHandler proc_handler(bits);
for (uint k = 0; k < NUM_CARGO + 3; k++) {
if (statspec->grf_prop.spritegroup[k] != nullptr) {
std::bitset<256> proc_bits = bits;
CheckDeterministicSpriteGroupOutputVarBitsProcedureHandler proc_handler(proc_bits);
proc_handler.ProcessGroup(statspec->grf_prop.spritegroup[k], nullptr, true);
}
}