PROTOCOL VERSION 30:
New ContentFeatures serialization version
Add node and tile color and palette
+ Fix plantlike visual_scale being applied squared and add compatibility
+ with pre-30 clients by sending sqrt(visual_scale)
*/
#define LATEST_PROTOCOL_VERSION 30
compatible_param_type_2 = CPT2_WALLMOUNTED;
}
+ float compatible_visual_scale = visual_scale;
+ if (protocol_version < 30 && drawtype == NDT_PLANTLIKE)
+ compatible_visual_scale = sqrt(visual_scale);
+
if (protocol_version == 13)
{
writeU8(os, 5); // version
writeS16(os, i->second);
}
writeU8(os, drawtype);
- writeF1000(os, visual_scale);
+ writeF1000(os, compatible_visual_scale);
writeU8(os, 6);
for (u32 i = 0; i < 6; i++)
tiledef[i].serialize(os, protocol_version);
writeS16(os, i->second);
}
writeU8(os, drawtype);
- writeF1000(os, visual_scale);
+ writeF1000(os, compatible_visual_scale);
writeU8(os, 6);
for (u32 i = 0; i < 6; i++)
tiledef[i].serialize(os, protocol_version);
writeS16(os, i->second);
}
writeU8(os, drawtype);
- writeF1000(os, visual_scale);
+ writeF1000(os, compatible_visual_scale);
writeU8(os, 6);
for (u32 i = 0; i < 6; i++)
tiledef[i].serialize(os, protocol_version);