summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/content_cao_firefly.cpp2
-rw-r--r--src/content_cao_item.cpp2
-rw-r--r--src/content_cao_lua.cpp6
-rw-r--r--src/content_cao_mobv2.cpp6
-rw-r--r--src/content_cao_oerkki1.cpp4
-rw-r--r--src/content_cao_player.cpp4
-rw-r--r--src/content_cao_rat.cpp2
-rw-r--r--src/content_cao_test.cpp2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/content_cao_firefly.cpp b/src/content_cao_firefly.cpp
index d54e57d35..677bc9ada 100644
--- a/src/content_cao_firefly.cpp
+++ b/src/content_cao_firefly.cpp
@@ -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);
diff --git a/src/content_cao_item.cpp b/src/content_cao_item.cpp
index 8d1bfb413..24d47d674 100644
--- a/src/content_cao_item.cpp
+++ b/src/content_cao_item.cpp
@@ -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);
diff --git a/src/content_cao_lua.cpp b/src/content_cao_lua.cpp
index 4a047fc58..afb98c2ea 100644
--- a/src/content_cao_lua.cpp
+++ b/src/content_cao_lua.cpp
@@ -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);
diff --git a/src/content_cao_mobv2.cpp b/src/content_cao_mobv2.cpp
index 403b8592e..825abb5e8 100644
--- a/src/content_cao_mobv2.cpp
+++ b/src/content_cao_mobv2.cpp
@@ -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);
diff --git a/src/content_cao_oerkki1.cpp b/src/content_cao_oerkki1.cpp
index 920a9890c..891b84b89 100644
--- a/src/content_cao_oerkki1.cpp
+++ b/src/content_cao_oerkki1.cpp
@@ -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;
diff --git a/src/content_cao_player.cpp b/src/content_cao_player.cpp
index bfa994f80..d5b15c261 100644
--- a/src/content_cao_player.cpp
+++ b/src/content_cao_player.cpp
@@ -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);
diff --git a/src/content_cao_rat.cpp b/src/content_cao_rat.cpp
index 23bec7fe5..30d07832f 100644
--- a/src/content_cao_rat.cpp
+++ b/src/content_cao_rat.cpp
@@ -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);
diff --git a/src/content_cao_test.cpp b/src/content_cao_test.cpp
index f062b73f6..430180529 100644
--- a/src/content_cao_test.cpp
+++ b/src/content_cao_test.cpp
@@ -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;