summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.cpp
diff options
context:
space:
mode:
authormtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-27 19:39:06 +0100
committermtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-27 19:39:06 +0100
commit59af89235bfb9189dec1fcee40a9231d03690d27 (patch)
treec6eaa3c688d0969d6cf30d6c39d347094771fabd /source/cPlayer.cpp
parentI think I fixed the memory leaks in the converter (diff)
downloadcuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar
cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.gz
cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.bz2
cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.lz
cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.xz
cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.tar.zst
cuberite-59af89235bfb9189dec1fcee40a9231d03690d27.zip
Diffstat (limited to 'source/cPlayer.cpp')
-rw-r--r--source/cPlayer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/cPlayer.cpp b/source/cPlayer.cpp
index dcc9de177..4e743a2fe 100644
--- a/source/cPlayer.cpp
+++ b/source/cPlayer.cpp
@@ -239,14 +239,14 @@ void cPlayer::Tick(float a_Dt)
}
cTimer t1;
- // Send Player List (Once per m_LastPlayerListTime/1000 second(s))
- if (m_LastPlayerListTime + cPlayer::E_PLAYER_LIST_TIME <= t1.GetNowTime()) {
+ // Send Player List (Once per m_LastPlayerListTime/1000 ms)
+ if (m_LastPlayerListTime + cPlayer::PLAYER_LIST_TIME_MS <= t1.GetNowTime()) {
cWorld::PlayerList PlayerList = cRoot::Get()->GetWorld()->GetAllPlayers();
for( cWorld::PlayerList::iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr )
{
if ((*itr) && (*itr)->GetClientHandle() && !((*itr)->GetClientHandle()->IsDestroyed())) {
- cPacket_PlayerListItem PlayerList(GetColor() + GetName(), true, (*itr)->GetClientHandle()->GetPing());
- (*itr)->GetClientHandle()->Send( PlayerList );
+ cPacket_PlayerListItem PlayerListItem(GetColor() + GetName(), true, (*itr)->GetClientHandle()->GetPing());
+ (*itr)->GetClientHandle()->Send( PlayerListItem );
}
}
m_LastPlayerListTime = t1.GetNowTime();