{
std::ostringstream os(std::ios::binary);
os << "hp_max=" << hp_max;
+ os << ", breath_max=" << breath_max;
os << ", physical=" << physical;
os << ", collideWithObjects=" << collideWithObjects;
os << ", weight=" << weight;
<< "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" ";
os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," << PP(selectionbox.MaxEdge);
os << ", pointable=" << pointable;
- os << ", can_zoom=" << can_zoom;
+ os << ", static_save=" << static_save;
+ os << ", eye_height=" << eye_height;
+ os << ", zoom_fov=" << zoom_fov;
+ os << ", use_texture_alpha=" << use_texture_alpha;
return os.str();
}
void ObjectProperties::serialize(std::ostream &os) const
{
- writeU8(os, 2); // version, protocol_version >= 36
+ writeU8(os, 3); // version, protocol_version >= 36
writeS16(os, hp_max);
writeU8(os, physical);
writeF1000(os, weight);
writeARGB8(os, color);
}
writeU8(os, collideWithObjects);
- writeF1000(os,stepheight);
+ writeF1000(os, stepheight);
writeU8(os, automatic_face_movement_dir);
writeF1000(os, automatic_face_movement_dir_offset);
writeU8(os, backface_culling);
writeF1000(os, automatic_face_movement_max_rotation_per_sec);
os << serializeString(infotext);
os << serializeString(wield_item);
- writeU8(os, can_zoom);
writeS8(os, glow);
+ writeU16(os, breath_max);
+ writeF1000(os, eye_height);
+ writeF1000(os, zoom_fov);
+ writeU8(os, use_texture_alpha);
// Add stuff only at the bottom.
// Never remove anything, because we don't want new versions of this
void ObjectProperties::deSerialize(std::istream &is)
{
int version = readU8(is);
- if (version != 2)
+ if (version != 3)
throw SerializationError("unsupported ObjectProperties version");
hp_max = readS16(is);
makes_footstep_sound = readU8(is);
automatic_rotate = readF1000(is);
mesh = deSerializeString(is);
+ colors.clear();
u32 color_count = readU16(is);
for (u32 i = 0; i < color_count; i++){
colors.push_back(readARGB8(is));
automatic_face_movement_max_rotation_per_sec = readF1000(is);
infotext = deSerializeString(is);
wield_item = deSerializeString(is);
- can_zoom = readU8(is);
glow = readS8(is);
+ breath_max = readU16(is);
+ eye_height = readF1000(is);
+ zoom_fov = readF1000(is);
+ use_texture_alpha = readU8(is);
}