1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Allow modifying movement speed, jump height and gravity per-player via the Lua API.

This commit is contained in:
MirceaKitsune 2013-04-05 01:03:28 -10:00 committed by PilzAdam
parent 2a0badf2d5
commit c5a8448c41
14 changed files with 97 additions and 10 deletions

View file

@ -117,6 +117,18 @@ 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::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);
return os.str();
}
std::string gob_cmd_update_animation(v2f frames, float frame_speed, float frame_blend)
{
std::ostringstream os(std::ios::binary);