diff options
Diffstat (limited to 'src/genericobject.cpp')
-rw-r--r-- | src/genericobject.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/genericobject.cpp b/src/genericobject.cpp index e2fbde838..9a1b9d8d0 100644 --- a/src/genericobject.cpp +++ b/src/genericobject.cpp @@ -117,7 +117,8 @@ std::string gob_cmd_update_armor_groups(const ItemGroupList &armor_groups) return os.str(); } -std::string gob_cmd_update_physics_override(float physics_override_speed, float physics_override_jump, float physics_override_gravity) +std::string gob_cmd_update_physics_override(float physics_override_speed, float physics_override_jump, + float physics_override_gravity, bool sneak, bool sneak_glitch) { std::ostringstream os(std::ios::binary); // command @@ -126,6 +127,9 @@ std::string gob_cmd_update_physics_override(float physics_override_speed, float 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); return os.str(); } |