| 385 | } |
| 386 | |
| 387 | void ScriptExtender::LoadExtensionState(ExtensionStateContext ctx) |
| 388 | { |
| 389 | if (extensionLoaded_ && (!extensionState_ || ctx == extensionState_->Context())) { |
| 390 | return; |
| 391 | } |
| 392 | |
| 393 | OPTICK_EVENT(Optick::Category::IO); |
| 394 | PostStartup(); |
| 395 | |
| 396 | if (!extensionState_) { |
| 397 | ResetExtensionState(); |
| 398 | } |
| 399 | |
| 400 | extensionState_->LoadConfigs(); |
| 401 | |
| 402 | if (!gExtender->GetLibraryManager().CriticalInitializationFailed()) { |
| 403 | OsiMsg("Initializing client with target context " << ContextToString(ctx)); |
| 404 | gExtender->GetLibraryManager().ApplyCodePatches(); |
| 405 | //networkManager_.ExtendNetworkingClient(); |
| 406 | extensionState_->RequestLuaReset(ctx, true); |
| 407 | } |
| 408 | |
| 409 | extensionLoaded_ = true; |
| 410 | } |
| 411 | |
| 412 | END_NS() |
nothing calls this directly
no test coverage detected