Begin show_others

Signed-off-by: btd <bardadymchik@gmail.com>
This commit is contained in:
btd 2010-10-23 23:26:10 +04:00
parent 161e5dbb7e
commit 61092f7baa
6 changed files with 40 additions and 0 deletions

View file

@ -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"),
]),
]

View file

@ -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;
}
}

View file

@ -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);

View file

@ -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;

View file

@ -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()

View file

@ -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;