+std::string gob_cmd_punched(s16 damage, s16 result_hp)
+{
+ std::ostringstream os(std::ios::binary);
+ // command
+ writeU8(os, GENERIC_CMD_PUNCHED);
+ // damage
+ writeS16(os, damage);
+ // result_hp
+ writeS16(os, result_hp);
+ return os.str();
+}
+
+std::string gob_cmd_update_armor_groups(const ItemGroupList &armor_groups)
+{
+ std::ostringstream os(std::ios::binary);
+ writeU8(os, GENERIC_CMD_UPDATE_ARMOR_GROUPS);
+ writeU16(os, armor_groups.size());
+ for (const auto &armor_group : armor_groups) {
+ os<<serializeString(armor_group.first);
+ writeS16(os, armor_group.second);
+ }
+ return os.str();
+}
+
+std::string gob_cmd_update_physics_override(float physics_override_speed, float physics_override_jump,
+ float physics_override_gravity, bool sneak, bool sneak_glitch, bool new_move)
+{
+ std::ostringstream os(std::ios::binary);
+ // command
+ writeU8(os, GENERIC_CMD_SET_PHYSICS_OVERRIDE);
+ // parameters
+ writeF1000(os, physics_override_speed);
+ writeF1000(os, physics_override_jump);
+ writeF1000(os, physics_override_gravity);
+ // these are sent inverted so we get true when the server sends nothing
+ writeU8(os, !sneak);
+ writeU8(os, !sneak_glitch);
+ writeU8(os, !new_move);
+ return os.str();
+}
+
+std::string gob_cmd_update_animation(v2f frames, float frame_speed, float frame_blend, bool frame_loop)