mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add sneak and sneak_glitch to set_physics_override()
This commit is contained in:
parent
d9de9f23d9
commit
15be2659ea
11 changed files with 53 additions and 13 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue