diff options
| author | oy <Tom_Adams@web.de> | 2010-09-22 01:00:33 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-09-22 01:00:33 +0200 |
| commit | 68ed9154aea6b56c17db58cdbda806b7b428f885 (patch) | |
| tree | 25acaa157e2d9443013d9bc92c48bc9591c0912f /src/game/server | |
| parent | 5156579d1df8b3ee29c6017f1a6a72f446583266 (diff) | |
| download | zcatch-68ed9154aea6b56c17db58cdbda806b7b428f885.tar.gz zcatch-68ed9154aea6b56c17db58cdbda806b7b428f885.zip | |
don't add player that aren't ingame to the snapshot and don't let them autospawn. Closes #125
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/player.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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<CNetObj_ClientInfo *>(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); |