mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #1859
1859: Move the afk flag up front r=heinrich5991 a=Learath2 Co-authored-by: Learath <learath2@gmail.com>
This commit is contained in:
commit
29e691c2db
|
@ -1,7 +1,7 @@
|
|||
from datatypes import *
|
||||
|
||||
Emotes = ["NORMAL", "PAIN", "HAPPY", "SURPRISE", "ANGRY", "BLINK"]
|
||||
PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "AIM", "AFK"]
|
||||
PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "AIM"]
|
||||
GameFlags = ["TEAMS", "FLAGS"]
|
||||
GameStateFlags = ["GAMEOVER", "SUDDENDEATH", "PAUSED", "RACETIME"]
|
||||
CharacterFlags = ["SOLO", "JETPACK", "NO_COLLISION", "ENDLESS_HOOK", "ENDLESS_JUMP", "SUPER",
|
||||
|
@ -19,6 +19,7 @@ GameInfoFlags = [
|
|||
"ENTITIES_DDNET", "ENTITIES_DDRACE", "ENTITIES_RACE", "ENTITIES_FNG",
|
||||
"ENTITIES_VANILLA",
|
||||
]
|
||||
ExPlayerFlags = ["AFK"]
|
||||
|
||||
Emoticons = ["OOP", "EXCLAMATION", "HEARTS", "DROP", "DOTDOT", "MUSIC", "SORRY", "GHOST", "SUSHI", "SPLATTEE", "DEVILTEE", "ZOMG", "ZZZ", "WTF", "EYES", "QUESTION"]
|
||||
|
||||
|
@ -73,6 +74,7 @@ Flags = [
|
|||
Flags("GAMESTATEFLAG", GameStateFlags),
|
||||
Flags("CHARACTERFLAG", CharacterFlags),
|
||||
Flags("GAMEINFOFLAG", GameInfoFlags),
|
||||
Flags("EXPLAYERFLAG", ExPlayerFlags),
|
||||
]
|
||||
|
||||
Objects = [
|
||||
|
|
|
@ -1194,7 +1194,7 @@ 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 & PLAYERFLAG_AFK;
|
||||
m_aClients[Item.m_ID].m_Afk = pInfo->m_Flags & EXPLAYERFLAG_AFK;
|
||||
}
|
||||
else if(Item.m_Type == NETOBJTYPE_CHARACTER)
|
||||
{
|
||||
|
|
|
@ -324,7 +324,7 @@ void CPlayer::Snap(int SnappingClient)
|
|||
return;
|
||||
|
||||
pDDNetPlayer->m_AuthLevel = Server()->GetAuthedState(id);
|
||||
pDDNetPlayer->m_Flags = m_Afk ? PLAYERFLAG_AFK : 0;
|
||||
pDDNetPlayer->m_Flags = m_Afk ? EXPLAYERFLAG_AFK : 0;
|
||||
}
|
||||
|
||||
void CPlayer::FakeSnap()
|
||||
|
|
Loading…
Reference in a new issue