MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ResetObjects

Method ResetObjects

src/openrct2/object/ObjectManager.cpp:260–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258 }
259
260 void ResetObjects() override
261 {
262 for (auto& list : _loadedObjects)
263 {
264 for (auto* loadedObject : list)
265 {
266 if (loadedObject != nullptr)
267 {
268 loadedObject->Unload();
269 loadedObject->Load();
270 }
271 }
272 }
273 UpdateSceneryGroupIndexes();
274 ResetTypeToRideEntryIndexMap();
275
276 // We will need to replay the title music if the title music object got reloaded
277 Audio::StopTitleMusic();
278 Audio::PlayTitleMusic();
279 RideAudio::StopAllChannels();
280 }
281
282 std::vector<const ObjectRepositoryItem*> GetPackableObjects() override
283 {

Callers 2

LanguageOpenFunction · 0.80
ApplyMethod · 0.80

Calls 5

StopTitleMusicFunction · 0.85
PlayTitleMusicFunction · 0.85
StopAllChannelsFunction · 0.85
UnloadMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected