fix object message type sent
authorsapier <sapier at gmx dot net>
Sun, 15 Jan 2012 20:44:51 +0000 (21:44 +0100)
committersapier <sapier at gmx dot net>
Sun, 15 Jan 2012 20:44:51 +0000 (21:44 +0100)
src/content_cao_firefly.cpp
src/content_cao_item.cpp
src/content_cao_lua.cpp
src/content_cao_mobv2.cpp
src/content_cao_oerkki1.cpp
src/content_cao_player.cpp
src/content_cao_rat.cpp
src/content_cao_test.cpp

index d54e57d352bc2c06e6dfe0a22bd237812f794d60..677bc9ada3fa4ae301df3bf7da17ec3c3016d32e 100644 (file)
@@ -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);
index 8d1bfb413e32115292a6dce1384e3a02cf53863d..24d47d674d5ab531210cd9c12990e1f52145f91c 100644 (file)
@@ -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);
index 4a047fc58b15085d7e5741df966dcf89459bc9de..afb98c2eab7e02c48ca79fb0ac6427bab7695ff8 100644 (file)
@@ -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);
index 403b8592e519da47590a8b333d959f4e6f616f81..825abb5e85638e683d0ff18cc3480ae161c8e9e0 100644 (file)
@@ -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);
index 920a9890c2f8fc82af531eac2f4c8c0821e23704..891b84b8964c8e545aea61931c38c7e142a53d72 100644 (file)
@@ -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;
index bfa994f804cfffdf1a773d9709cf18648dc4e054..d5b15c2614e1aa657c37192de3c1930b62b37479 100644 (file)
@@ -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);
index 23bec7fe531519673fd913e4033e7b6f30c320a8..30d07832fc5cbc0067df1e3cb4230e0020766ce1 100644 (file)
@@ -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);
index f062b73f6368a4fb92f432867476a35e5b939023..430180529b5d67b27ac8ace49b41c13b0349cb4a 100644 (file)
@@ -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;