From 68ed9154aea6b56c17db58cdbda806b7b428f885 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 22 Sep 2010 01:00:33 +0200 Subject: don't add player that aren't ingame to the snapshot and don't let them autospawn. Closes #125 --- src/game/server/player.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game/server/player.cpp') diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index b2e9c0c2..8b3c623a 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -25,6 +25,9 @@ CPlayer::~CPlayer() void CPlayer::Tick() { + if(!Server()->ClientIngame(m_ClientID)) + return; + Server()->SetClientScore(m_ClientID, m_Score); // do latency stuff @@ -69,6 +72,9 @@ void CPlayer::Tick() void CPlayer::Snap(int SnappingClient) { + if(!Server()->ClientIngame(m_ClientID)) + return; + CNetObj_ClientInfo *ClientInfo = static_cast(Server()->SnapNewItem(NETOBJTYPE_CLIENTINFO, m_ClientID, sizeof(CNetObj_ClientInfo))); StrToInts(&ClientInfo->m_Name0, 6, Server()->ClientName(m_ClientID)); StrToInts(&ClientInfo->m_Skin0, 6, m_TeeInfos.m_SkinName); -- cgit 1.4.1