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

Method ToggleSpectate

Sources/Jazz2/UI/Menu/InGameMenu.cpp:543–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541 }
542
543 void InGameMenu::ToggleSpectate()
544 {
545 if (auto* mpLevelHandler = runtime_cast<Jazz2::Multiplayer::MpLevelHandler>(_root)) {
546 bool isSpectating = mpLevelHandler->IsSpectating();
547 mpLevelHandler->RequestSpectateMode(!isSpectating);
548 }
549
550 _root->ResumeGame();
551 }
552#endif
553
554 bool InGameMenu::ActionPressed(PlayerAction action)

Callers 1

ExecuteSelectedMethod · 0.80

Calls 3

RequestSpectateModeMethod · 0.80
IsSpectatingMethod · 0.45
ResumeGameMethod · 0.45

Tested by

no test coverage detected