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

Function resetSpatialIndex

src/OpenLoco/src/Entities/EntityManager.cpp:169–181  ·  view source on GitHub ↗

0x0046FF54

Source from the content-addressed store, hash-verified

167
168 // 0x0046FF54
169 void resetSpatialIndex()
170 {
171 // Clear existing array
172 std::fill(std::begin(_entitySpatialIndex), std::end(_entitySpatialIndex), EntityId::null);
173
174 // Original filled an unreferenced array at 0x010A5A8E as well then overwrote part of it???
175
176 // Refill the index
177 for (auto& ent : entities())
178 {
179 insertToSpatialIndex(ent);
180 }
181 }
182
183 // 0x0046FC57
184 void updateSpatialIndex()

Callers 6

saveGiantScreenshotFunction · 0.85
exportGameStateToFileFunction · 0.85
importSaveToGameStateFunction · 0.85
resetFunction · 0.85
moveSpatialEntryFunction · 0.85
freeEntityFunction · 0.85

Calls 4

beginFunction · 0.85
endFunction · 0.85
entitiesFunction · 0.85
insertToSpatialIndexFunction · 0.85

Tested by

no test coverage detected