mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
add paused and spec to explayerflags
This commit is contained in:
parent
968b5c1fed
commit
e112cf6791
|
@ -19,7 +19,7 @@ GameInfoFlags = [
|
|||
"ENTITIES_DDNET", "ENTITIES_DDRACE", "ENTITIES_RACE", "ENTITIES_FNG",
|
||||
"ENTITIES_VANILLA", "DONT_MASK_ENTITIES",
|
||||
]
|
||||
ExPlayerFlags = ["AFK"]
|
||||
ExPlayerFlags = ["AFK", "PAUSED", "SPEC"]
|
||||
|
||||
Emoticons = ["OOP", "EXCLAMATION", "HEARTS", "DROP", "DOTDOT", "MUSIC", "SORRY", "GHOST", "SUSHI", "SPLATTEE", "DEVILTEE", "ZOMG", "ZZZ", "WTF", "EYES", "QUESTION"]
|
||||
|
||||
|
|
|
@ -1197,6 +1197,8 @@ void CGameClient::OnNewSnapshot()
|
|||
const CNetObj_DDNetPlayer *pInfo = (const CNetObj_DDNetPlayer *)pData;
|
||||
m_aClients[Item.m_ID].m_AuthLevel = pInfo->m_AuthLevel;
|
||||
m_aClients[Item.m_ID].m_Afk = pInfo->m_Flags & EXPLAYERFLAG_AFK;
|
||||
m_aClients[Item.m_ID].m_Paused = pInfo->m_Flags & EXPLAYERFLAG_PAUSED;
|
||||
m_aClients[Item.m_ID].m_Spec = pInfo->m_Flags & EXPLAYERFLAG_SPEC;
|
||||
}
|
||||
else if(Item.m_Type == NETOBJTYPE_CHARACTER)
|
||||
{
|
||||
|
@ -1768,6 +1770,8 @@ void CGameClient::CClientData::Reset()
|
|||
m_Foe = false;
|
||||
m_AuthLevel = AUTHED_NO;
|
||||
m_Afk = false;
|
||||
m_Paused = false;
|
||||
m_Spec = false;
|
||||
m_SkinInfo.m_Texture = g_GameClient.m_pSkins->Get(0)->m_ColorTexture;
|
||||
m_SkinInfo.m_ColorBody = ColorRGBA(1,1,1);
|
||||
m_SkinInfo.m_ColorFeet = ColorRGBA(1,1,1);
|
||||
|
|
|
@ -305,6 +305,8 @@ public:
|
|||
|
||||
int m_AuthLevel;
|
||||
bool m_Afk;
|
||||
bool m_Paused;
|
||||
bool m_Spec;
|
||||
|
||||
void UpdateRenderInfo();
|
||||
void Reset();
|
||||
|
|
|
@ -324,7 +324,13 @@ void CPlayer::Snap(int SnappingClient)
|
|||
return;
|
||||
|
||||
pDDNetPlayer->m_AuthLevel = Server()->GetAuthedState(id);
|
||||
pDDNetPlayer->m_Flags = m_Afk ? EXPLAYERFLAG_AFK : 0;
|
||||
pDDNetPlayer->m_Flags = 0;
|
||||
if(m_Afk)
|
||||
pDDNetPlayer->m_Flags |= EXPLAYERFLAG_AFK;
|
||||
if(m_Paused == PAUSE_SPEC)
|
||||
pDDNetPlayer->m_Flags |= EXPLAYERFLAG_SPEC;
|
||||
if(m_Paused == PAUSE_PAUSED)
|
||||
pDDNetPlayer->m_Flags |= EXPLAYERFLAG_PAUSED;
|
||||
}
|
||||
|
||||
void CPlayer::FakeSnap()
|
||||
|
|
Loading…
Reference in a new issue