Added AttachmentFloat

This commit is contained in:
Elias Fleckenstein 2020-10-12 18:12:04 +02:00
parent cb1915efa7
commit 80f416d514
4 changed files with 3 additions and 1 deletions

View File

@ -23,6 +23,7 @@ core.cheats = {
["Coords"] = "coords",
["Tracers"] = "enable_tracers",
["ESP"] = "enable_esp",
["AttachmentFloat"] = "float_above_parent",
},
["World"] = {
["FastDig"] = "fastdig",

View File

@ -340,7 +340,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, f32 tool_r
// mods expect the player head to be at the parent's position
// plus eye height.
if (player->getParent())
player_position = player->getParent()->getPosition();
player_position = player->getParent()->getPosition() + v3f(0, g_settings->getBool("float_above_parent") ? BS : 0, 0);
// Smooth the camera movement when the player instantly moves upward due to stepheight.
// To smooth the 'not touching_ground' stepheight, smoothing is necessary when jumping

View File

@ -94,6 +94,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_tracers", "false");
settings->setDefault("enable_esp", "false");
settings->setDefault("no_slow", "false");
settings->setDefault("float_above_parent", "false");
// Keymap
settings->setDefault("remote_port", "30000");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 124 B