diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-11-26 09:10:27 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-11-26 09:10:27 +0200 |
commit | ab507f83e2e0b1f442341724bc47a8480667628e (patch) | |
tree | 0fbbd322641bd3587aa7b5a8020f63e949eff6f9 /src | |
parent | d67004a3be64bfe3e1df5d0771f340ebb0eebabe (diff) | |
download | minetest-ab507f83e2e0b1f442341724bc47a8480667628e.tar.gz minetest-ab507f83e2e0b1f442341724bc47a8480667628e.tar.bz2 minetest-ab507f83e2e0b1f442341724bc47a8480667628e.zip |
Fix LuaEntitySAO::getClientInitializationData() and bump the related version
Diffstat (limited to 'src')
-rw-r--r-- | src/content_cao.cpp | 2 | ||||
-rw-r--r-- | src/content_sao.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 339c9f248..ce41c8312 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -650,7 +650,7 @@ public: // version u8 version = readU8(is); // check version - if(version != 0){ + if(version != 1){ errorstream<<"GenericCAO: Unsupported init data version" <<std::endl; return; diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 406bd9c68..efc14570a 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -567,10 +567,10 @@ void LuaEntitySAO::step(float dtime, bool send_recommended) std::string LuaEntitySAO::getClientInitializationData() { std::ostringstream os(std::ios::binary); - writeU8(os, 0); // version + writeU8(os, 1); // version os<<serializeString(""); // name - writeS16(os, getId()); //id writeU8(os, 0); // is_player + writeS16(os, getId()); //id writeV3F1000(os, m_base_position); writeF1000(os, m_yaw); writeS16(os, m_hp); @@ -965,7 +965,7 @@ bool PlayerSAO::unlimitedTransferDistance() const std::string PlayerSAO::getClientInitializationData() { std::ostringstream os(std::ios::binary); - writeU8(os, 0); // version + writeU8(os, 1); // version os<<serializeString(m_player->getName()); // name writeU8(os, 1); // is_player writeS16(os, getId()); //id |