mirror of
https://github.com/moparisthebest/minetest
synced 2024-12-22 23:58:48 -05:00
Make view bobbing amount configurable
This commit is contained in:
parent
3f58028d31
commit
7c2639ddd9
@ -103,6 +103,8 @@ screenH# = 600
|
|||||||
#invisible_stone = false
|
#invisible_stone = false
|
||||||
# Path for screenshots
|
# Path for screenshots
|
||||||
#screenshot_path = .
|
#screenshot_path = .
|
||||||
|
# Amount of view bobbing (0 = no view bobbing, 1.0 = normal, 2.0 = double)
|
||||||
|
#view_bobbing_amount = 1.0
|
||||||
|
|
||||||
#
|
#
|
||||||
# Server stuff
|
# Server stuff
|
||||||
|
@ -221,6 +221,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize)
|
|||||||
//rel_cam_target += 0.03 * bobvec;
|
//rel_cam_target += 0.03 * bobvec;
|
||||||
//rel_cam_up.rotateXYBy(0.02 * bobdir * bobtmp * PI);
|
//rel_cam_up.rotateXYBy(0.02 * bobdir * bobtmp * PI);
|
||||||
float f = 1.0;
|
float f = 1.0;
|
||||||
|
f *= g_settings->getFloat("view_bobbing_amount");
|
||||||
rel_cam_pos += bobvec * f;
|
rel_cam_pos += bobvec * f;
|
||||||
//rel_cam_target += 0.995 * bobvec * f;
|
//rel_cam_target += 0.995 * bobvec * f;
|
||||||
rel_cam_target += bobvec * f;
|
rel_cam_target += bobvec * f;
|
||||||
|
@ -74,6 +74,7 @@ void set_default_settings(Settings *settings)
|
|||||||
settings->setDefault("enable_clouds", "true");
|
settings->setDefault("enable_clouds", "true");
|
||||||
settings->setDefault("invisible_stone", "false");
|
settings->setDefault("invisible_stone", "false");
|
||||||
settings->setDefault("screenshot_path", ".");
|
settings->setDefault("screenshot_path", ".");
|
||||||
|
settings->setDefault("view_bobbing_amount", "1.0");
|
||||||
|
|
||||||
// Server stuff
|
// Server stuff
|
||||||
// "map-dir" doesn't exist by default.
|
// "map-dir" doesn't exist by default.
|
||||||
|
Loading…
Reference in New Issue
Block a user