MCPcopy Create free account
hub / github.com/ddnet/ddnet / CanUseAutoSpecCamera

Method CanUseAutoSpecCamera

src/game/client/components/camera.cpp:632–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630}
631
632bool CCamera::CanUseAutoSpecCamera() const
633{
634 if(Client()->State() == IClient::STATE_DEMOPLAYBACK)
635 {
636 // only follow mode has the correct camera info
637 return GameClient()->m_Snap.m_SpecInfo.m_HasCameraInfo && GameClient()->m_DemoSpecId == SPEC_FOLLOW;
638 }
639
640 return g_Config.m_ClSpecAutoSync && GameClient()->m_Snap.m_SpecInfo.m_HasCameraInfo &&
641 GameClient()->m_Snap.m_SpecInfo.m_SpectatorId != GameClient()->m_aLocalIds[0] &&
642 (!GameClient()->Client()->DummyConnected() || GameClient()->m_Snap.m_SpecInfo.m_SpectatorId != GameClient()->m_aLocalIds[1]);
643}
644
645void CCamera::ToggleAutoSpecCamera()
646{

Callers 6

RenderSpectatorHudMethod · 0.80
ConZoomMethod · 0.80
ToggleAutoSpecCameraMethod · 0.80
OnInputMethod · 0.80
RenderDemoPlayerMethod · 0.80
RenderGameMethod · 0.80

Calls 4

DummyConnectedMethod · 0.80
ClientFunction · 0.50
StateMethod · 0.45
ClientMethod · 0.45

Tested by 1

OnInputMethod · 0.64