0x004389CC
| 610 | |
| 611 | // 0x004389CC |
| 612 | static void stopAllCompanyVehicles(const CompanyId companyId) |
| 613 | { |
| 614 | const auto prevUpdateCompany = GameCommands::getUpdatingCompanyId(); |
| 615 | GameCommands::setUpdatingCompanyId(companyId); |
| 616 | |
| 617 | for (auto head : VehicleManager::VehicleList()) |
| 618 | { |
| 619 | if (head->owner != companyId) |
| 620 | { |
| 621 | continue; |
| 622 | } |
| 623 | |
| 624 | if (head->has38Flags(Vehicles::Flags38::isGhost)) |
| 625 | { |
| 626 | continue; |
| 627 | } |
| 628 | GameCommands::VehicleChangeRunningModeArgs args{}; |
| 629 | args.head = head->id; |
| 630 | args.mode = GameCommands::VehicleChangeRunningModeArgs::Mode::stopVehicle; |
| 631 | // This used to call the command directly |
| 632 | GameCommands::doCommand(args, GameCommands::Flags::apply); |
| 633 | } |
| 634 | |
| 635 | GameCommands::setUpdatingCompanyId(prevUpdateCompany); |
| 636 | } |
| 637 | |
| 638 | void Company::updateMonthly1() |
| 639 | { |
no test coverage detected