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

Function PrepareMapForSave

src/openrct2/Game.cpp:793–805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791}
792
793void PrepareMapForSave()
794{
795 ViewportSetSavedView();
796
797#ifdef ENABLE_SCRIPTING
798 auto& scriptEngine = GetContext()->GetScriptEngine();
799 auto& hookEngine = scriptEngine.GetHookEngine();
800 if (hookEngine.HasSubscriptions(Scripting::HookType::mapSave))
801 {
802 hookEngine.Call(Scripting::HookType::mapSave, false);
803 }
804#endif
805}

Callers 3

ScenarioSaveFunction · 0.85
SaveMapMethod · 0.85
OnCrashFunction · 0.85

Calls 4

ViewportSetSavedViewFunction · 0.85
GetContextFunction · 0.85
HasSubscriptionsMethod · 0.80
CallMethod · 0.80

Tested by

no test coverage detected