mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-17 14:55:13 -05:00
Reduce time of red screen when damaged
10 seconds in PvP is very long and annoying.
This commit is contained in:
parent
c58b9d8da3
commit
e4d570eafc
@ -2399,8 +2399,8 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
|
|||||||
damage_flash += 8.0 * event.player_damage.amount;
|
damage_flash += 8.0 * event.player_damage.amount;
|
||||||
|
|
||||||
player->hurt_tilt_timer = 1.5;
|
player->hurt_tilt_timer = 1.5;
|
||||||
player->hurt_tilt_strength = event.player_damage.amount/2;
|
player->hurt_tilt_strength = event.player_damage.amount/4;
|
||||||
player->hurt_tilt_strength = rangelim(player->hurt_tilt_strength, 2.0, 10.0);
|
player->hurt_tilt_strength = rangelim(player->hurt_tilt_strength, 1.0, 4.0);
|
||||||
|
|
||||||
MtEvent *e = new SimpleTriggerEvent("PlayerDamage");
|
MtEvent *e = new SimpleTriggerEvent("PlayerDamage");
|
||||||
gamedef->event()->put(e);
|
gamedef->event()->put(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user