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

Method ProcessPause

src/game/server/player.cpp:803–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801}
802
803void CPlayer::ProcessPause()
804{
805 if(m_ForcePauseTime && m_ForcePauseTime < Server()->Tick())
806 {
807 m_ForcePauseTime = 0;
808 GameServer()->SendChatTarget(m_ClientId, "The force pause timer is now over, you can exit with /spec");
809 }
810
811 if(m_Paused == PAUSE_SPEC && !m_pCharacter->IsPaused() && CanSpec())
812 {
813 m_pCharacter->Pause(true);
814 GameServer()->CreateDeath(m_pCharacter->m_Pos, m_ClientId, GameServer()->m_pController->GetMaskForPlayerWorldEvent(m_ClientId));
815 GameServer()->CreateSound(m_pCharacter->m_Pos, SOUND_PLAYER_DIE, GameServer()->m_pController->GetMaskForPlayerWorldEvent(m_ClientId));
816 }
817}
818
819int CPlayer::Pause(int State, bool Force)
820{

Callers

nothing calls this directly

Calls 8

SendChatTargetMethod · 0.80
CreateDeathMethod · 0.80
CreateSoundMethod · 0.80
ServerClass · 0.50
TickMethod · 0.45
IsPausedMethod · 0.45
PauseMethod · 0.45

Tested by

no test coverage detected