mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Can't pause while you are in a team
This commit is contained in:
parent
22aa8940a7
commit
af160c8401
|
@ -716,7 +716,7 @@ void CGameContext::ConTogglePause(IConsole::IResult *pResult, void *pUserData, i
|
|||
if(g_Config.m_SvPauseable)
|
||||
{
|
||||
CCharacter* chr = pPlayer->GetCharacter();
|
||||
if(!pPlayer->GetTeam() && chr && (!chr->m_aWeapons[WEAPON_NINJA].m_Got || chr->m_FreezeTime) && chr->IsGrounded() && chr->m_Pos==chr->m_PrevPos && !pPlayer->m_InfoSaved)
|
||||
if(!pPlayer->GetTeam() && chr && (!chr->m_aWeapons[WEAPON_NINJA].m_Got || chr->m_FreezeTime) && chr->IsGrounded() && chr->m_Pos==chr->m_PrevPos && !chr->Team() && !pPlayer->m_InfoSaved)
|
||||
{
|
||||
if(pPlayer->m_Last_Pause + pSelf->Server()->TickSpeed() * g_Config.m_SvPauseFrequency <= pSelf->Server()->Tick()) {
|
||||
pPlayer->SaveCharacter();
|
||||
|
@ -735,7 +735,7 @@ void CGameContext::ConTogglePause(IConsole::IResult *pResult, void *pUserData, i
|
|||
//pPlayer->LoadCharacter();//TODO:Check if this system Works
|
||||
}
|
||||
else if(chr)
|
||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", (chr->m_aWeapons[WEAPON_NINJA].m_Got)?"You can't use /pause while you are a ninja":(!chr->IsGrounded())?"You can't use /pause while you are a in air":"You can't use /pause while you are moving");
|
||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", (chr->Team())?"You can't pause while you are in a team":(chr->m_aWeapons[WEAPON_NINJA].m_Got)?"You can't use /pause while you are a ninja":(!chr->IsGrounded())?"You can't use /pause while you are a in air":"You can't use /pause while you are moving");
|
||||
else
|
||||
pSelf->Console()->PrintResponse(IConsole::OUTPUT_LEVEL_STANDARD, "info", "No pause data saved.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue