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

Function updateSnowLine

src/OpenLoco/src/Scenario/Scenario.cpp:128–152  ·  view source on GitHub ↗

0x00496A84

Source from the content-addressed store, hash-verified

126
127 // 0x00496A84
128 void updateSnowLine(int32_t currentDayOfYear)
129 {
130 auto* climateObj = ObjectManager::get<ClimateObject>();
131 if (climateObj == nullptr)
132 {
133 return;
134 }
135
136 updateSeason(currentDayOfYear, climateObj);
137
138 if (getCurrentSeason() == Season::winter)
139 {
140 if (getCurrentSnowLine() != climateObj->winterSnowLine)
141 {
142 setCurrentSnowLine(getCurrentSnowLine() - 1);
143 }
144 }
145 else
146 {
147 if (getCurrentSnowLine() != climateObj->summerSnowLine)
148 {
149 setCurrentSnowLine(getCurrentSnowLine() + 1);
150 }
151 }
152 }
153
154 // 0x00525FB4
155 World::SmallZ getCurrentSnowLine()

Callers 1

dateTickFunction · 0.85

Calls 4

updateSeasonFunction · 0.85
getCurrentSeasonFunction · 0.85
getCurrentSnowLineFunction · 0.85
setCurrentSnowLineFunction · 0.85

Tested by

no test coverage detected