mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Begin show_others
Signed-off-by: btd <bardadymchik@gmail.com>
This commit is contained in:
parent
161e5dbb7e
commit
61092f7baa
|
@ -293,4 +293,25 @@ Messages = [
|
|||
NetStringStrict("m_Type"),
|
||||
NetStringStrict("m_Value"),
|
||||
]),
|
||||
|
||||
NetMessage("Cl_IsRace", []),
|
||||
|
||||
NetMessage("Cl_Team", [
|
||||
NetIntAny("m_Tee0"),
|
||||
NetIntAny("m_Tee1"),
|
||||
NetIntAny("m_Tee2"),
|
||||
NetIntAny("m_Tee3"),
|
||||
NetIntAny("m_Tee4"),
|
||||
NetIntAny("m_Tee5"),
|
||||
NetIntAny("m_Tee6"),
|
||||
NetIntAny("m_Tee7"),
|
||||
NetIntAny("m_Tee8"),
|
||||
NetIntAny("m_Tee9"),
|
||||
NetIntAny("m_Tee10"),
|
||||
NetIntAny("m_Tee11"),
|
||||
NetIntAny("m_Tee12"),
|
||||
NetIntAny("m_Tee13"),
|
||||
NetIntAny("m_Tee14"),
|
||||
NetIntAny("m_Tee15"),
|
||||
]),
|
||||
]
|
||||
|
|
|
@ -304,6 +304,8 @@ void CGameClient::OnInit()
|
|||
Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "gameclient", aBuf);
|
||||
|
||||
m_ServerMode = SERVERMODE_PURE;
|
||||
|
||||
m_RaceMsgSent = false;
|
||||
}
|
||||
|
||||
void CGameClient::DispatchInput()
|
||||
|
@ -815,6 +817,13 @@ void CGameClient::OnNewSnapshot()
|
|||
else
|
||||
m_ServerMode = SERVERMODE_PUREMOD;
|
||||
}
|
||||
|
||||
if(!m_RaceMsgSent && m_Snap.m_pLocalInfo)
|
||||
{
|
||||
CNetMsg_Cl_IsRace Msg;
|
||||
Client()->SendPackMsg(&Msg, MSGFLAG_VITAL);
|
||||
m_RaceMsgSent = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,8 @@ class CGameClient : public IGameClient
|
|||
int m_LastNewPredictedTick;
|
||||
|
||||
int64 m_LastSendInfo;
|
||||
|
||||
bool m_RaceMsgSent;
|
||||
|
||||
static void ConTeam(IConsole::IResult *pResult, void *pUserData, int ClientID);
|
||||
static void ConKill(IConsole::IResult *pResult, void *pUserData, int ClientID);
|
||||
|
|
|
@ -958,6 +958,11 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
|
|||
SendBroadcast(aBuf, ClientId);
|
||||
}
|
||||
}
|
||||
else if (MsgId == NETMSGTYPE_CL_ISRACE)
|
||||
{
|
||||
pPlayer->m_IsUsingRaceClient = true;
|
||||
|
||||
}
|
||||
else if(MsgId == NETMSGTYPE_CL_CHANGEINFO || MsgId == NETMSGTYPE_CL_STARTINFO)
|
||||
{
|
||||
CNetMsg_Cl_ChangeInfo *pMsg = (CNetMsg_Cl_ChangeInfo *)pRawMsg;
|
||||
|
|
|
@ -30,6 +30,7 @@ CPlayer::CPlayer(CGameContext *pGameServer, int CID, int Team)
|
|||
GameServer()->Score()->PlayerData(CID)->Reset();
|
||||
|
||||
m_Invisible = false;
|
||||
m_IsUsingRaceClient = false;
|
||||
}
|
||||
|
||||
CPlayer::~CPlayer()
|
||||
|
|
|
@ -87,6 +87,8 @@ public:
|
|||
// TODO: clean this up
|
||||
int m_Authed;
|
||||
|
||||
bool m_IsUsingRaceClient;
|
||||
|
||||
bool m_ColorSet; // Set if player changed color at least once
|
||||
|
||||
int m_Starttime;
|
||||
|
|
Loading…
Reference in a new issue