diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-11-29 17:55:07 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-11-29 17:55:07 +0200 |
commit | d10627a77fe022263e2319be282fbec68e713545 (patch) | |
tree | 72b0c0d140aed99f17438c978fa3bf4238dc436b /src/server.cpp | |
parent | d2090a32d84106815b3422bbbab5e6c9c681c152 (diff) | |
download | minetest-d10627a77fe022263e2319be282fbec68e713545.tar.gz minetest-d10627a77fe022263e2319be282fbec68e713545.tar.bz2 minetest-d10627a77fe022263e2319be282fbec68e713545.zip |
Windows bug fixes
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/server.cpp b/src/server.cpp index 16f6611ca..a40352847 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -670,7 +670,9 @@ void RemoteClient::SendObjectData( s32 sum = (s32)os.tellp() + 2 + (s32)bos.tellp(); // break out if data too big if(sum > MAX_OBJECTDATA_SIZE) - d = d_max+1; + { + goto skip_subsequent; + } } //try catch(InvalidPositionException &e) @@ -692,28 +694,7 @@ void RemoteClient::SendObjectData( } } -#if 0 - /* - Write objects - */ - - // Write block count - writeU16(buf, blockcount); - os.write((char*)buf, 2); - - for(core::map<v3s16, MapBlock*>::Iterator - i = blocks.getIterator(); - i.atEnd() == false; i++) - { - v3s16 p = i.getNode()->getKey(); - // Write blockpos - writeV3S16(buf, p); - os.write((char*)buf, 6); - // Write objects - MapBlock *block = i.getNode()->getValue(); - block->serializeObjects(os, serialization_version); - } -#endif +skip_subsequent: // Write block count writeU16(buf, blockcount); |