X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgenericobject.cpp;h=58f4b997e828067dee65f7c92ecfd8f250cc88e8;hb=9762650f978cc7bae78861b70a051b26cc5e2dc6;hp=9a1b9d8d0dc657b109220b3d2a2d5877cce5277d;hpb=15be2659eae6da2c3807713eb6e068d8aa436423;p=minetest.git diff --git a/src/genericobject.cpp b/src/genericobject.cpp index 9a1b9d8d0..58f4b997e 100644 --- a/src/genericobject.cpp +++ b/src/genericobject.cpp @@ -68,7 +68,7 @@ std::string gob_cmd_update_position( std::string gob_cmd_set_texture_mod(const std::string &mod) { std::ostringstream os(std::ios::binary); - // command + // command writeU8(os, GENERIC_CMD_SET_TEXTURE_MOD); // parameters os<first); writeS16(os, i->second); } @@ -118,10 +118,10 @@ std::string gob_cmd_update_armor_groups(const ItemGroupList &armor_groups) } std::string gob_cmd_update_physics_override(float physics_override_speed, float physics_override_jump, - float physics_override_gravity, bool sneak, bool sneak_glitch) + float physics_override_gravity, bool sneak, bool sneak_glitch, bool new_move) { std::ostringstream os(std::ios::binary); - // command + // command writeU8(os, GENERIC_CMD_SET_PHYSICS_OVERRIDE); // parameters writeF1000(os, physics_override_speed); @@ -130,25 +130,29 @@ std::string gob_cmd_update_physics_override(float physics_override_speed, float // 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) +std::string gob_cmd_update_animation(v2f frames, float frame_speed, float frame_blend, bool frame_loop) { std::ostringstream os(std::ios::binary); - // command + // command writeU8(os, GENERIC_CMD_SET_ANIMATION); // parameters writeV2F1000(os, frames); writeF1000(os, frame_speed); writeF1000(os, frame_blend); + // these are sent inverted so we get true when the server sends nothing + writeU8(os, !frame_loop); return os.str(); } -std::string gob_cmd_update_bone_position(std::string bone, v3f position, v3f rotation) +std::string gob_cmd_update_bone_position(const std::string &bone, v3f position, + v3f rotation) { std::ostringstream os(std::ios::binary); - // command + // command writeU8(os, GENERIC_CMD_SET_BONE_POSITION); // parameters os<