]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/object_properties.cpp
Add function to get server info.
[dragonfireclient.git] / src / object_properties.cpp
index abd1bbd0929361619ff264ee4ca90aaecd5a017f..a77368151db64753f26314cf7b7fffbbfd53117d 100644 (file)
@@ -21,11 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "irrlichttypes_bloated.h"
 #include "exceptions.h"
 #include "util/serialize.h"
+#include "util/basic_macros.h"
 #include <sstream>
 
-#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
-#define PP2(x) "("<<(x).X<<","<<(x).Y<<")"
-
 ObjectProperties::ObjectProperties():
        hp_max(1),
        physical(false),
@@ -118,6 +116,8 @@ void ObjectProperties::serialize(std::ostream &os) const
        os << serializeString(nametag);
        writeARGB8(os, nametag_color);
        writeF1000(os, automatic_face_movement_max_rotation_per_sec);
+       os << serializeString(infotext);
+       os << serializeString(wield_item);
 
        // Add stuff only at the bottom.
        // Never remove anything, because we don't want new versions of this
@@ -159,6 +159,8 @@ void ObjectProperties::deSerialize(std::istream &is)
                        nametag = deSerializeString(is);
                        nametag_color = readARGB8(is);
                        automatic_face_movement_max_rotation_per_sec = readF1000(is);
+                       infotext = deSerializeString(is);
+                       wield_item = deSerializeString(is);
                }catch(SerializationError &e){}
        }
        else