summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-01-06 20:05:28 +0100
committersapier <Sapier at GMX dot net>2014-01-10 10:10:45 +0100
commit9edb91da5754cf194637d1d7faa513719b61f9b4 (patch)
tree66adfd87cb43e9b24adc70bcaabfae205fc10f8f /src/client.cpp
parent8b0b857eaaa50c6ec217a46c0577395c78ec04c7 (diff)
downloadminetest-9edb91da5754cf194637d1d7faa513719b61f9b4.tar.gz
minetest-9edb91da5754cf194637d1d7faa513719b61f9b4.tar.bz2
minetest-9edb91da5754cf194637d1d7faa513719b61f9b4.zip
Fixed minetest reliable udp implementation (compatible to old clients)
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 721c413c0..1c7ecf3f3 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -538,7 +538,7 @@ void Client::step(float dtime)
writeU16(&data[53], CLIENT_PROTOCOL_VERSION_MAX);
// Send as unreliable
- Send(0, data, false);
+ Send(1, data, false);
}
// Not connected, return
@@ -597,7 +597,7 @@ void Client::step(float dtime)
writeV3S16(&reply[2+1+6*k], *j);
k++;
}
- m_con.Send(PEER_ID_SERVER, 1, reply, true);
+ m_con.Send(PEER_ID_SERVER, 2, reply, true);
if(i == deleted_blocks.end())
break;
@@ -745,7 +745,7 @@ void Client::step(float dtime)
reply[2] = 1;
writeV3S16(&reply[3], r.p);
// Send as reliable
- m_con.Send(PEER_ID_SERVER, 1, reply, true);
+ m_con.Send(PEER_ID_SERVER, 2, reply, true);
}
}
if(num_processed_meshes > 0)
@@ -840,7 +840,7 @@ void Client::step(float dtime)
std::string s = os.str();
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable
- Send(0, data, true);
+ Send(1, data, true);
}
}
}
@@ -957,7 +957,7 @@ void Client::request_media(const std::list<std::string> &file_requests)
std::string s = os.str();
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable
- Send(0, data, true);
+ Send(1, data, true);
infostream<<"Client: Sending media request list to server ("
<<file_requests.size()<<" files)"<<std::endl;
}
@@ -970,7 +970,7 @@ void Client::received_media()
std::string s = os.str();
SharedBuffer<u8> data((u8*)s.c_str(), s.size());
// Send as reliable
- Send(0, data, true);
+ Send(1, data, true);
infostream<<"Client: Notifying server that we received all media"
<<std::endl;
}