Display message about DDNet client to players not using it

This commit is contained in:
def 2014-10-12 11:33:36 +02:00
parent 1d7d511941
commit 6333583141
2 changed files with 10 additions and 1 deletions

View file

@ -70,6 +70,7 @@ void CPlayer::Reset()
m_TuneZone = 0; m_TuneZone = 0;
m_TuneZoneOld = m_TuneZone; m_TuneZoneOld = m_TuneZone;
m_Halloween = false; m_Halloween = false;
m_FirstPacket = true;
if (g_Config.m_SvEvents) if (g_Config.m_SvEvents)
{ {
@ -355,6 +356,13 @@ void CPlayer::OnPredictedInput(CNetObj_PlayerInput *NewInput)
AfkVoteTimer(NewInput); AfkVoteTimer(NewInput);
if(m_FirstPacket)
{
if(m_ClientVersion <= VERSION_DDNET_OLD)
GameServer()->SendBroadcast("Get the client from ddnet.tw to use all features on DDNet.", m_ClientID);
m_FirstPacket = false;
}
if(m_pCharacter && !m_Paused) if(m_pCharacter && !m_Paused)
m_pCharacter->OnPredictedInput(NewInput); m_pCharacter->OnPredictedInput(NewInput);
} }

View file

@ -167,6 +167,7 @@ public:
int m_DefEmote; int m_DefEmote;
int m_DefEmoteReset; int m_DefEmoteReset;
bool m_Halloween; bool m_Halloween;
bool m_FirstPacket;
#if defined(CONF_SQL) #if defined(CONF_SQL)
int64 m_LastSQLQuery; int64 m_LastSQLQuery;
#endif #endif