diff options
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r-- | src/object_properties.cpp | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp index 172eec925..4171317de 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -33,31 +33,32 @@ ObjectProperties::ObjectProperties() std::string ObjectProperties::dump() { std::ostringstream os(std::ios::binary); - os<<"hp_max="<<hp_max; - os<<", physical="<<physical; - os<<", collideWithObjects="<<collideWithObjects; - os<<", weight="<<weight; - os<<", collisionbox="<<PP(collisionbox.MinEdge)<<","<<PP(collisionbox.MaxEdge); - os<<", visual="<<visual; - os<<", mesh="<<mesh; - os<<", visual_size="<<PP2(visual_size); - os<<", textures=["; + os << "hp_max=" << hp_max; + os << ", physical=" << physical; + os << ", collideWithObjects=" << collideWithObjects; + os << ", weight=" << weight; + os << ", collisionbox=" << PP(collisionbox.MinEdge) << "," << PP(collisionbox.MaxEdge); + os << ", visual=" << visual; + os << ", mesh=" << mesh; + os << ", visual_size=" << PP2(visual_size); + os << ", textures=["; for (const std::string &texture : textures) { - os<<"\""<< texture <<"\" "; + os << "\"" << texture << "\" "; } - os<<"]"; - os<<", colors=["; + os << "]"; + os << ", colors=["; for (const video::SColor &color : colors) { os << "\"" << color.getAlpha() << "," << color.getRed() << "," << color.getGreen() << "," << color.getBlue() << "\" "; } - os<<"]"; - os<<", spritediv="<<PP2(spritediv); - os<<", initial_sprite_basepos="<<PP2(initial_sprite_basepos); - os<<", is_visible="<<is_visible; - os<<", makes_footstep_sound="<<makes_footstep_sound; - os<<", automatic_rotate="<<automatic_rotate; - os<<", backface_culling="<<backface_culling; + os << "]"; + os << ", spritediv=" << PP2(spritediv); + os << ", initial_sprite_basepos=" << PP2(initial_sprite_basepos); + os << ", is_visible=" << is_visible; + os << ", makes_footstep_sound=" << makes_footstep_sound; + os << ", automatic_rotate="<< automatic_rotate; + os << ", backface_culling="<< backface_culling; + os << ", glow=" << glow; os << ", nametag=" << nametag; os << ", nametag_color=" << "\"" << nametag_color.getAlpha() << "," << nametag_color.getRed() << "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" "; @@ -106,6 +107,7 @@ void ObjectProperties::serialize(std::ostream &os) const os << serializeString(infotext); os << serializeString(wield_item); writeU8(os, can_zoom); + writeS8(os, glow); // Add stuff only at the bottom. // Never remove anything, because we don't want new versions of this @@ -153,4 +155,5 @@ void ObjectProperties::deSerialize(std::istream &is) infotext = deSerializeString(is); wield_item = deSerializeString(is); can_zoom = readU8(is); + glow = readS8(is); } |