MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / SetStateHandler

Method SetStateHandler

Sources/Main.cpp:1499–1512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499void GameEventHandler::SetStateHandler(std::shared_ptr<IStateHandler>&& handler)
1500{
1501 _currentHandler = std::move(handler);
1502
1503 Viewport::GetChain().clear();
1504 Vector2i res = theApplication().GetResolution();
1505 _currentHandler->OnInitializeViewport(res.X, res.Y);
1506
1507#if defined(WITH_MULTIPLAYER)
1508 if (_networkManager != nullptr) {
1509 _networkManager->SetStatusProvider(runtime_cast<IServerStatusProvider>(_currentHandler));
1510 }
1511#endif
1512}
1513
1514void GameEventHandler::WaitForVerify()
1515{

Callers 1

OnInitializeMethod · 0.80

Calls 3

clearMethod · 0.45
OnInitializeViewportMethod · 0.45
SetStatusProviderMethod · 0.45

Tested by

no test coverage detected