Skip to content

Commit 3674779

Browse files
committedApr 23, 2013
Disable fall bobbing by default; enable using fall_bobbing_amount = 1.0
1 parent c03c296 commit 3674779

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
 

‎minetest.conf.example

+2
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@
136136
#screenshot_path = .
137137
# Amount of view bobbing (0 = no view bobbing, 1.0 = normal, 2.0 = double)
138138
#view_bobbing_amount = 1.0
139+
# Amount of fall bobbing (0 = no fall bobbing, 1.0 = normal, 2.0 = double)
140+
#fall_bobbing_amount = 0.0
139141
# Anaglyph stereo
140142
#anaglyph = false
141143
#anaglyph_strength = 0.1

‎src/camera.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
263263
fall_bobbing = sin(fall_bobbing * 0.5 * M_PI) * -1;
264264
// Amplify according to the intensity of the impact
265265
fall_bobbing *= (1 - rangelim(50 / player->camera_impact, 0, 1)) * 5;
266+
267+
fall_bobbing *= g_settings->getFloat("fall_bobbing_amount");
266268
}
267269

268270
// Set head node transformation

‎src/defaultsettings.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ void set_default_settings(Settings *settings)
107107
settings->setDefault("enable_clouds", "true");
108108
settings->setDefault("screenshot_path", ".");
109109
settings->setDefault("view_bobbing_amount", "1.0");
110+
settings->setDefault("fall_bobbing_amount", "0.0");
110111
settings->setDefault("enable_3d_clouds", "true");
111112
settings->setDefault("cloud_height", "120");
112113
settings->setDefault("menu_clouds", "true");

0 commit comments

Comments
 (0)