Skip to content

Commit

Permalink
Display message about DDNet client to players not using it
Browse files Browse the repository at this point in the history
  • Loading branch information
def- committed Oct 12, 2014
1 parent 1d7d511 commit 6333583
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ void CPlayer::Reset()
m_TuneZone = 0;
m_TuneZoneOld = m_TuneZone;
m_Halloween = false;
m_FirstPacket = true;

if (g_Config.m_SvEvents)
{
{
time_t rawtime;
struct tm* timeinfo;
char d[16], m[16], y[16];
Expand Down Expand Up @@ -355,6 +356,13 @@ void CPlayer::OnPredictedInput(CNetObj_PlayerInput *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)
m_pCharacter->OnPredictedInput(NewInput);
}
Expand Down
1 change: 1 addition & 0 deletions src/game/server/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class CPlayer
int m_DefEmote;
int m_DefEmoteReset;
bool m_Halloween;
bool m_FirstPacket;
#if defined(CONF_SQL)
int64 m_LastSQLQuery;
#endif
Expand Down

0 comments on commit 6333583

Please sign in to comment.