* Update the cached animation trigger bitmask for a station. * @param st Station to update. */
| 657 | * @param st Station to update. |
| 658 | */ |
| 659 | void RoadStopUpdateCachedTriggers(BaseStation *st) |
| 660 | { |
| 661 | st->cached_roadstop_anim_triggers = {}; |
| 662 | st->cached_roadstop_cargo_triggers = 0; |
| 663 | |
| 664 | /* Combine animation trigger bitmask for all road stop specs |
| 665 | * of this station. */ |
| 666 | for (const auto &sm : GetStationSpecList<RoadStopSpec>(st)) { |
| 667 | if (sm.spec == nullptr) continue; |
| 668 | st->cached_roadstop_anim_triggers.Set(sm.spec->animation.triggers); |
| 669 | st->cached_roadstop_cargo_triggers |= sm.spec->cargo_triggers; |
| 670 | } |
| 671 | } |
no test coverage detected