MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getDestinationPosition

Function getDestinationPosition

src/OpenLoco/src/World/CompanyAi/CompanyAi.cpp:7878–7890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7876 }
7877
7878 static Pos2 getDestinationPosition(bool isIndustry, uint8_t destination)
7879 {
7880 if (isIndustry)
7881 {
7882 const auto* industry = IndustryManager::get(static_cast<IndustryId>(destination));
7883 return Pos2{ industry->x, industry->y };
7884 }
7885 else
7886 {
7887 auto* town = TownManager::get(static_cast<TownId>(destination));
7888 return Pos2{ town->x, town->y };
7889 }
7890 }
7891
7892 Pos2 AiThought::getDestinationPositionA() const
7893 {

Callers 2

Calls 1

getFunction · 0.50

Tested by

no test coverage detected