diff options
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r-- | src/object_properties.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp index 97914f53e..8d51bcbfa 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -27,7 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., ObjectProperties::ObjectProperties() { textures.emplace_back("unknown_object.png"); - colors.emplace_back(255, 255, 255, 255); + colors.emplace_back(255,255,255,255); } std::string ObjectProperties::dump() @@ -37,8 +37,7 @@ std::string ObjectProperties::dump() os << ", breath_max=" << breath_max; os << ", physical=" << physical; os << ", collideWithObjects=" << collideWithObjects; - os << ", collisionbox=" << PP(collisionbox.MinEdge) << "," - << PP(collisionbox.MaxEdge); + os << ", collisionbox=" << PP(collisionbox.MinEdge) << "," << PP(collisionbox.MaxEdge); os << ", visual=" << visual; os << ", mesh=" << mesh; os << ", visual_size=" << PP(visual_size); @@ -50,22 +49,20 @@ std::string ObjectProperties::dump() os << ", colors=["; for (const video::SColor &color : colors) { os << "\"" << color.getAlpha() << "," << color.getRed() << "," - << color.getGreen() << "," << color.getBlue() << "\" "; + << 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 << ", 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() << "\" "; - os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," - << PP(selectionbox.MaxEdge); + os << ", nametag_color=" << "\"" << nametag_color.getAlpha() << "," << nametag_color.getRed() + << "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" "; + os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," << PP(selectionbox.MaxEdge); os << ", pointable=" << pointable; os << ", static_save=" << static_save; os << ", eye_height=" << eye_height; @@ -144,7 +141,7 @@ void ObjectProperties::deSerialize(std::istream &is) visual_size = readV3F32(is); textures.clear(); u32 texture_count = readU16(is); - for (u32 i = 0; i < texture_count; i++) { + for (u32 i = 0; i < texture_count; i++){ textures.push_back(deSerializeString(is)); } spritediv = readV2S16(is); @@ -155,7 +152,7 @@ void ObjectProperties::deSerialize(std::istream &is) mesh = deSerializeString(is); colors.clear(); u32 color_count = readU16(is); - for (u32 i = 0; i < color_count; i++) { + for (u32 i = 0; i < color_count; i++){ colors.push_back(readARGB8(is)); } collideWithObjects = readU8(is); @@ -179,6 +176,5 @@ void ObjectProperties::deSerialize(std::istream &is) if (is.eof()) throw SerializationError(""); shaded = tmp; - } catch (SerializationError &e) { - } + } catch (SerializationError &e) {} } |