forked from Mirrorlandia_minetest/minetest
Fix LuaEntitySAO::getClientInitializationData() and bump the related version
This commit is contained in:
parent
d67004a3be
commit
ab507f83e2
@ -650,7 +650,7 @@ public:
|
|||||||
// version
|
// version
|
||||||
u8 version = readU8(is);
|
u8 version = readU8(is);
|
||||||
// check version
|
// check version
|
||||||
if(version != 0){
|
if(version != 1){
|
||||||
errorstream<<"GenericCAO: Unsupported init data version"
|
errorstream<<"GenericCAO: Unsupported init data version"
|
||||||
<<std::endl;
|
<<std::endl;
|
||||||
return;
|
return;
|
||||||
|
@ -567,10 +567,10 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
|
|||||||
std::string LuaEntitySAO::getClientInitializationData()
|
std::string LuaEntitySAO::getClientInitializationData()
|
||||||
{
|
{
|
||||||
std::ostringstream os(std::ios::binary);
|
std::ostringstream os(std::ios::binary);
|
||||||
writeU8(os, 0); // version
|
writeU8(os, 1); // version
|
||||||
os<<serializeString(""); // name
|
os<<serializeString(""); // name
|
||||||
writeS16(os, getId()); //id
|
|
||||||
writeU8(os, 0); // is_player
|
writeU8(os, 0); // is_player
|
||||||
|
writeS16(os, getId()); //id
|
||||||
writeV3F1000(os, m_base_position);
|
writeV3F1000(os, m_base_position);
|
||||||
writeF1000(os, m_yaw);
|
writeF1000(os, m_yaw);
|
||||||
writeS16(os, m_hp);
|
writeS16(os, m_hp);
|
||||||
@ -965,7 +965,7 @@ bool PlayerSAO::unlimitedTransferDistance() const
|
|||||||
std::string PlayerSAO::getClientInitializationData()
|
std::string PlayerSAO::getClientInitializationData()
|
||||||
{
|
{
|
||||||
std::ostringstream os(std::ios::binary);
|
std::ostringstream os(std::ios::binary);
|
||||||
writeU8(os, 0); // version
|
writeU8(os, 1); // version
|
||||||
os<<serializeString(m_player->getName()); // name
|
os<<serializeString(m_player->getName()); // name
|
||||||
writeU8(os, 1); // is_player
|
writeU8(os, 1); // is_player
|
||||||
writeS16(os, getId()); //id
|
writeS16(os, getId()); //id
|
||||||
|
Loading…
Reference in New Issue
Block a user