summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-01-31 00:24:00 +0100
committersapier <Sapier at GMX dot net>2014-01-31 18:44:43 +0100
commite258675eabc874d31bc9c6cf49e4bbc1f7f3f417 (patch)
tree2d9dfd872c8b88db13cfdeaa0503b3d88545d179 /src/client.cpp
parent21f1bec72433748e220d19e97a846df83340518e (diff)
downloadminetest-e258675eabc874d31bc9c6cf49e4bbc1f7f3f417.tar.gz
minetest-e258675eabc874d31bc9c6cf49e4bbc1f7f3f417.tar.bz2
minetest-e258675eabc874d31bc9c6cf49e4bbc1f7f3f417.zip
Add propper client initialization
-add client states to avoid server sending data to uninitialized clients -don't show uninitialized clients to other players -propper client disconnect handling Minor comment fixes in server Minor bugfixes in connection -improved peer id calculation -honor NDEBUG flag -improved disconnect handling -increased initial send window Remove some dead code
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 6c4d9eea8..cc1ec2a98 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -383,13 +383,6 @@ void Client::step(float dtime)
// 0ms
ReceiveAll();
}
-
- {
- //TimeTaker timer("m_con_mutex + m_con.RunTimeouts()", m_device);
- // 0ms
- //JMutexAutoLock lock(m_con_mutex); //bulk comment-out
- m_con.RunTimeouts(dtime);
- }
/*
Packet counter
@@ -758,6 +751,7 @@ void Client::step(float dtime)
if (m_media_downloader && m_media_downloader->isStarted()) {
m_media_downloader->step(this);
if (m_media_downloader->isDone()) {
+ received_media();
delete m_media_downloader;
m_media_downloader = NULL;
}
@@ -1610,11 +1604,6 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
}
m_media_downloader->step(this);
- if (m_media_downloader->isDone()) {
- // might be done already if all media is in the cache
- delete m_media_downloader;
- m_media_downloader = NULL;
- }
}
else if(command == TOCLIENT_MEDIA)
{
@@ -1666,11 +1655,6 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
m_media_downloader->conventionalTransferDone(
name, data, this);
}
-
- if (m_media_downloader->isDone()) {
- delete m_media_downloader;
- m_media_downloader = NULL;
- }
}
else if(command == TOCLIENT_TOOLDEF)
{