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

Function resetDefaultLandObject

src/OpenLoco/src/Objects/ObjectManager.cpp:1120–1144  ·  view source on GitHub ↗

0x00469F90

Source from the content-addressed store, hash-verified

1118
1119 // 0x00469F90
1120 static void resetDefaultLandObject()
1121 {
1122 for (auto i = 0U; i < getMaxObjects(ObjectType::land); i++)
1123 {
1124 auto* landObj = get<LandObject>(i);
1125 if (landObj != nullptr)
1126 {
1127 if (landObj->distributionPattern == 0)
1128 {
1129 getGameState().lastLandOption = i;
1130 return;
1131 }
1132 }
1133 }
1134 for (auto i = 0U; i < getMaxObjects(ObjectType::land); i++)
1135 {
1136 auto* landObj = get<LandObject>(i);
1137 if (landObj != nullptr)
1138 {
1139 getGameState().lastLandOption = i;
1140 return;
1141 }
1142 }
1143 getGameState().lastLandOption = 0xFFU;
1144 }
1145
1146 // 0x0047D9F2
1147 static void updateTrafficHandedness()

Callers 1

updateTerraformObjectsFunction · 0.85

Calls 1

getMaxObjectsFunction · 0.85

Tested by

no test coverage detected