os << ", breath_max=" << breath_max;
os << ", physical=" << physical;
os << ", collideWithObjects=" << collideWithObjects;
os << ", breath_max=" << breath_max;
os << ", physical=" << physical;
os << ", collideWithObjects=" << collideWithObjects;
os << ", collisionbox=" << PP(collisionbox.MinEdge) << "," << PP(collisionbox.MaxEdge);
os << ", visual=" << visual;
os << ", mesh=" << mesh;
os << ", collisionbox=" << PP(collisionbox.MinEdge) << "," << PP(collisionbox.MaxEdge);
os << ", visual=" << visual;
os << ", mesh=" << mesh;
os << ", nametag=" << nametag;
os << ", nametag_color=" << "\"" << nametag_color.getAlpha() << "," << nametag_color.getRed()
<< "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" ";
os << ", nametag=" << nametag;
os << ", nametag_color=" << "\"" << nametag_color.getAlpha() << "," << nametag_color.getRed()
<< "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" ";
+
+ if (nametag_bgcolor)
+ os << ", nametag_bgcolor=" << "\"" << nametag_color.getAlpha() << "," << nametag_color.getRed()
+ << "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" ";
+ else
+ os << ", nametag_bgcolor=null ";
+
os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," << PP(selectionbox.MaxEdge);
os << ", pointable=" << pointable;
os << ", static_save=" << static_save;
os << ", eye_height=" << eye_height;
os << ", zoom_fov=" << zoom_fov;
os << ", use_texture_alpha=" << use_texture_alpha;
os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," << PP(selectionbox.MaxEdge);
os << ", pointable=" << pointable;
os << ", static_save=" << static_save;
os << ", eye_height=" << eye_height;
os << ", zoom_fov=" << zoom_fov;
os << ", use_texture_alpha=" << use_texture_alpha;
+ os << ", damage_texture_modifier=" << damage_texture_modifier;
+ os << ", shaded=" << shaded;
+ os << ", show_on_minimap=" << show_on_minimap;
- writeF1000(os, weight);
- writeV3F1000(os, collisionbox.MinEdge);
- writeV3F1000(os, collisionbox.MaxEdge);
- writeV3F1000(os, selectionbox.MinEdge);
- writeV3F1000(os, selectionbox.MaxEdge);
+ writeF32(os, 0.f); // Removed property (weight)
+ writeV3F32(os, collisionbox.MinEdge);
+ writeV3F32(os, collisionbox.MaxEdge);
+ writeV3F32(os, selectionbox.MinEdge);
+ writeV3F32(os, selectionbox.MaxEdge);
- os << serializeString(visual);
- writeV2F1000(os, visual_size);
+ os << serializeString16(visual);
+ writeV3F32(os, visual_size);
writeU16(os, textures.size());
for (const std::string &texture : textures) {
writeU16(os, textures.size());
for (const std::string &texture : textures) {
}
writeV2S16(os, spritediv);
writeV2S16(os, initial_sprite_basepos);
writeU8(os, is_visible);
writeU8(os, makes_footstep_sound);
}
writeV2S16(os, spritediv);
writeV2S16(os, initial_sprite_basepos);
writeU8(os, is_visible);
writeU8(os, makes_footstep_sound);
writeU16(os, colors.size());
for (video::SColor color : colors) {
writeARGB8(os, color);
}
writeU8(os, collideWithObjects);
writeU16(os, colors.size());
for (video::SColor color : colors) {
writeARGB8(os, color);
}
writeU8(os, collideWithObjects);
- writeF1000(os, automatic_face_movement_max_rotation_per_sec);
- os << serializeString(infotext);
- os << serializeString(wield_item);
+ writeF32(os, automatic_face_movement_max_rotation_per_sec);
+ os << serializeString16(infotext);
+ os << serializeString16(wield_item);
- writeF1000(os, eye_height);
- writeF1000(os, zoom_fov);
+ writeF32(os, eye_height);
+ writeF32(os, zoom_fov);
+ os << serializeString16(damage_texture_modifier);
+ writeU8(os, shaded);
+ writeU8(os, show_on_minimap);
+
+ if (!nametag_bgcolor)
+ writeARGB8(os, NULL_BGCOLOR);
+ else if (nametag_bgcolor.value().getAlpha() == 0)
+ writeARGB8(os, video::SColor(0, 0, 0, 0));
+ else
+ writeARGB8(os, nametag_bgcolor.value());
// Add stuff only at the bottom.
// Never remove anything, because we don't want new versions of this
// Add stuff only at the bottom.
// Never remove anything, because we don't want new versions of this
- weight = readF1000(is);
- collisionbox.MinEdge = readV3F1000(is);
- collisionbox.MaxEdge = readV3F1000(is);
- selectionbox.MinEdge = readV3F1000(is);
- selectionbox.MaxEdge = readV3F1000(is);
+ readU32(is); // removed property (weight)
+ collisionbox.MinEdge = readV3F32(is);
+ collisionbox.MaxEdge = readV3F32(is);
+ selectionbox.MinEdge = readV3F32(is);
+ selectionbox.MaxEdge = readV3F32(is);
}
spritediv = readV2S16(is);
initial_sprite_basepos = readV2S16(is);
is_visible = readU8(is);
makes_footstep_sound = readU8(is);
}
spritediv = readV2S16(is);
initial_sprite_basepos = readV2S16(is);
is_visible = readU8(is);
makes_footstep_sound = readU8(is);
colors.clear();
u32 color_count = readU16(is);
for (u32 i = 0; i < color_count; i++){
colors.push_back(readARGB8(is));
}
collideWithObjects = readU8(is);
colors.clear();
u32 color_count = readU16(is);
for (u32 i = 0; i < color_count; i++){
colors.push_back(readARGB8(is));
}
collideWithObjects = readU8(is);
- automatic_face_movement_max_rotation_per_sec = readF1000(is);
- infotext = deSerializeString(is);
- wield_item = deSerializeString(is);
+ automatic_face_movement_max_rotation_per_sec = readF32(is);
+ infotext = deSerializeString16(is);
+ wield_item = deSerializeString16(is);
+ try {
+ damage_texture_modifier = deSerializeString16(is);
+ u8 tmp = readU8(is);
+ if (is.eof())
+ return;
+ shaded = tmp;
+ tmp = readU8(is);
+ if (is.eof())
+ return;
+ show_on_minimap = tmp;
+
+ auto bgcolor = readARGB8(is);
+ if (bgcolor != NULL_BGCOLOR)
+ nametag_bgcolor = bgcolor;
+ else
+ nametag_bgcolor = nullopt;
+ } catch (SerializationError &e) {}