mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Merge 8d235bbc51
into aba2b6638e
This commit is contained in:
commit
a1b69aa5ae
4 changed files with 12 additions and 2 deletions
|
@ -130,6 +130,8 @@ local function load()
|
||||||
{ heading = fgettext_ne("Movement") },
|
{ heading = fgettext_ne("Movement") },
|
||||||
"arm_inertia",
|
"arm_inertia",
|
||||||
"view_bobbing_amount",
|
"view_bobbing_amount",
|
||||||
|
{ heading = fgettext_ne("Damage") },
|
||||||
|
"hurt_flash_enabled"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -491,6 +491,11 @@ arm_inertia (Arm inertia) bool true
|
||||||
# For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double.
|
# For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double.
|
||||||
view_bobbing_amount (View bobbing factor) float 1.0 0.0 7.9
|
view_bobbing_amount (View bobbing factor) float 1.0 0.0 7.9
|
||||||
|
|
||||||
|
[**Damage]
|
||||||
|
|
||||||
|
# Flashing of the screen when taking damage.
|
||||||
|
hurt_flash_enabled (Damage flash) bool true
|
||||||
|
|
||||||
[**Camera]
|
[**Camera]
|
||||||
|
|
||||||
# Field of view in degrees.
|
# Field of view in degrees.
|
||||||
|
|
|
@ -2689,8 +2689,10 @@ void Game::handleClientEvent_PlayerDamage(ClientEvent *event, CameraOrientation
|
||||||
player->getCAO()->getProperties().hp_max : PLAYER_MAX_HP_DEFAULT;
|
player->getCAO()->getProperties().hp_max : PLAYER_MAX_HP_DEFAULT;
|
||||||
f32 damage_ratio = event->player_damage.amount / hp_max;
|
f32 damage_ratio = event->player_damage.amount / hp_max;
|
||||||
|
|
||||||
runData.damage_flash += 95.0f + 64.f * damage_ratio;
|
if (g_settings->getBool("hurt_flash_enabled")) {
|
||||||
runData.damage_flash = MYMIN(runData.damage_flash, 127.0f);
|
runData.damage_flash += 95.0f + 64.f * damage_ratio;
|
||||||
|
runData.damage_flash = MYMIN(runData.damage_flash, 127.0f);
|
||||||
|
}
|
||||||
|
|
||||||
player->hurt_tilt_timer = 1.5f;
|
player->hurt_tilt_timer = 1.5f;
|
||||||
player->hurt_tilt_strength =
|
player->hurt_tilt_strength =
|
||||||
|
|
|
@ -306,6 +306,7 @@ void set_default_settings()
|
||||||
settings->setDefault("show_entity_selectionbox", "false");
|
settings->setDefault("show_entity_selectionbox", "false");
|
||||||
settings->setDefault("ambient_occlusion_gamma", "1.8");
|
settings->setDefault("ambient_occlusion_gamma", "1.8");
|
||||||
settings->setDefault("arm_inertia", "true");
|
settings->setDefault("arm_inertia", "true");
|
||||||
|
settings->setDefault("hurt_flash_enabled", "true");
|
||||||
settings->setDefault("show_nametag_backgrounds", "true");
|
settings->setDefault("show_nametag_backgrounds", "true");
|
||||||
settings->setDefault("show_block_bounds_radius_near", "4");
|
settings->setDefault("show_block_bounds_radius_near", "4");
|
||||||
settings->setDefault("transparency_sorting_group_by_buffers", "true");
|
settings->setDefault("transparency_sorting_group_by_buffers", "true");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue