mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
fix object message type sent
This commit is contained in:
parent
65ac1d46b3
commit
e3122ae727
8 changed files with 14 additions and 14 deletions
|
@ -132,7 +132,7 @@ public:
|
|||
std::istringstream is(data, std::ios::binary);
|
||||
// command
|
||||
u8 cmd = readU8(is);
|
||||
if(cmd == 0)
|
||||
if(cmd == AO_Message_type::SetPosition)
|
||||
{
|
||||
// pos
|
||||
m_position = readV3F1000(is);
|
||||
|
|
|
@ -175,7 +175,7 @@ public:
|
|||
std::istringstream is(data, std::ios::binary);
|
||||
// command
|
||||
u8 cmd = readU8(is);
|
||||
if(cmd == 0)
|
||||
if(cmd == AO_Message_type::SetPosition)
|
||||
{
|
||||
// pos
|
||||
m_position = readV3F1000(is);
|
||||
|
|
|
@ -353,7 +353,7 @@ public:
|
|||
std::istringstream is(data, std::ios::binary);
|
||||
// command
|
||||
u8 cmd = readU8(is);
|
||||
if(cmd == 0) // update position
|
||||
if(cmd == AO_Message_type::SetPosition) // update position
|
||||
{
|
||||
// do_interpolate
|
||||
bool do_interpolate = readU8(is);
|
||||
|
@ -378,12 +378,12 @@ public:
|
|||
}
|
||||
updateNodePos();
|
||||
}
|
||||
else if(cmd == 1) // set texture modification
|
||||
else if(cmd == AO_Message_type::SetTextureMod) // set texture modification
|
||||
{
|
||||
std::string mod = deSerializeString(is);
|
||||
updateTextures(mod);
|
||||
}
|
||||
else if(cmd == 2) // set sprite
|
||||
else if(cmd == AO_Message_type::SetSprite) // set sprite
|
||||
{
|
||||
v2s16 p = readV2S16(is);
|
||||
int num_frames = readU16(is);
|
||||
|
|
|
@ -283,7 +283,7 @@ public:
|
|||
u8 cmd = readU8(is);
|
||||
|
||||
// Move
|
||||
if(cmd == 0)
|
||||
if(cmd == AO_Message_type::SetPosition)
|
||||
{
|
||||
// pos
|
||||
m_position = readV3F1000(is);
|
||||
|
@ -297,7 +297,7 @@ public:
|
|||
updateNodePos();
|
||||
}
|
||||
// Damage
|
||||
else if(cmd == 1)
|
||||
else if(cmd == AO_Message_type::TakeDamage)
|
||||
{
|
||||
//u16 damage = readU16(is);
|
||||
|
||||
|
@ -313,7 +313,7 @@ public:
|
|||
m_damage_visual_timer = 0.2;*/
|
||||
}
|
||||
// Trigger shooting
|
||||
else if(cmd == 2)
|
||||
else if(cmd == AO_Message_type::Shoot)
|
||||
{
|
||||
// length
|
||||
m_shooting_unset_timer = readF1000(is);
|
||||
|
|
|
@ -215,7 +215,7 @@ public:
|
|||
std::istringstream is(data, std::ios::binary);
|
||||
// command
|
||||
u8 cmd = readU8(is);
|
||||
if(cmd == 0)
|
||||
if(cmd == AO_Message_type::SetPosition)
|
||||
{
|
||||
// pos
|
||||
m_position = readV3F1000(is);
|
||||
|
@ -224,7 +224,7 @@ public:
|
|||
m_yaw = readF1000(is);
|
||||
updateNodePos();
|
||||
}
|
||||
else if(cmd == 1)
|
||||
else if(cmd == AO_Message_type::TakeDamage)
|
||||
{
|
||||
//u16 damage = readU8(is);
|
||||
m_damage_visual_timer = 1.0;
|
||||
|
|
|
@ -230,7 +230,7 @@ public:
|
|||
std::istringstream is(data, std::ios::binary);
|
||||
// command
|
||||
u8 cmd = readU8(is);
|
||||
if(cmd == 0) // update position
|
||||
if(cmd == AO_Message_type::SetPosition) // update position
|
||||
{
|
||||
// pos
|
||||
m_position = readV3F1000(is);
|
||||
|
@ -241,7 +241,7 @@ public:
|
|||
|
||||
updateNodePos();
|
||||
}
|
||||
else if(cmd == 1) // punched
|
||||
else if(cmd == AO_Message_type::Punched) // punched
|
||||
{
|
||||
// damage
|
||||
s16 damage = readS16(is);
|
||||
|
|
|
@ -135,7 +135,7 @@ public:
|
|||
std::istringstream is(data, std::ios::binary);
|
||||
// command
|
||||
u8 cmd = readU8(is);
|
||||
if(cmd == 0)
|
||||
if(cmd == AO_Message_type::SetPosition)
|
||||
{
|
||||
// pos
|
||||
m_position = readV3F1000(is);
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
std::istringstream is(data, std::ios::binary);
|
||||
u16 cmd;
|
||||
is>>cmd;
|
||||
if(cmd == 0)
|
||||
if(cmd == AO_Message_type::SetPosition)
|
||||
{
|
||||
v3f newpos;
|
||||
is>>newpos.X;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue