MCPcopy Create free account
hub / github.com/Norbyte/bg3se / LoadExtensionState

Method LoadExtensionState

BG3Extender/Extender/Server/ScriptExtenderServer.cpp:251–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251void ScriptExtender::LoadExtensionState(ExtensionStateContext ctx)
252{
253 if (extensionLoaded_ && (!extensionState_ || ctx == extensionState_->Context())) {
254 return;
255 }
256
257 PostStartup();
258
259 if (!extensionState_) {
260 ResetExtensionState();
261 }
262
263 extensionState_->LoadConfigs();
264
265 if (!gExtender->GetLibraryManager().CriticalInitializationFailed()) {
266 OsiMsg("Initializing server with target context " << ContextToString(ctx));
267 gExtender->GetLibraryManager().ApplyCodePatches();
268 network_.ExtendNetworking();
269 osiris_.GetCustomFunctionManager().ClearDynamicEntries();
270 extensionState_->RequestLuaReset(ctx, true);
271 }
272
273 extensionLoaded_ = true;
274}
275
276void ScriptExtender::OnSavegameVisit(OsirisVariableHelper* helpers, SavegameVisitor* visitor)
277{

Callers 1

OnStatsLoadGuardedMethod · 0.45

Calls 8

ContextToStringFunction · 0.85
ContextMethod · 0.80
LoadConfigsMethod · 0.80
ApplyCodePatchesMethod · 0.80
ClearDynamicEntriesMethod · 0.80
RequestLuaResetMethod · 0.80
ExtendNetworkingMethod · 0.45

Tested by

no test coverage detected