0.1s controls check delay is actually noticeable

master
aa6 2017-05-07 13:01:08 +03:00
parent 067aa41f0b
commit ec47decc97
5 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ Minetest mod for sprinting with W, A and D buttons.
**How to use**
1. Press A and D simultaneously to trigger the `ready_to_sprint` event.
1. Press A and D simultaneously to trigger the `ready_to_sprint` state.
2. Then press W to start sprinting.
3. Release A and D (keep W pressed) and continue sprinting until the stamina runs out.

View File

@ -1 +1 @@
0.4.36
0.4.37

View File

@ -4,7 +4,7 @@ minetest_wadsprint.DYSPNEA_THRESHOLD_VALUE = 3
minetest_wadsprint.SAVE_PLAYERS_STATS_TO_FILE = true
minetest_wadsprint.PLAYERS_STATS_FILE_LIMIT_RECORDS = 1000
minetest_wadsprint.PLAYER_STATS_UPDATE_PERIOD_SECONDS = 1
minetest_wadsprint.PLAYER_CONTROLS_CHECK_PERIOD_SECONDS = 0.2
minetest_wadsprint.PLAYER_CONTROLS_CHECK_PERIOD_SECONDS = 0.1
minetest_wadsprint.SPRINT_SPEED_MODIFIER_COEFFICIENT = 3.8
minetest_wadsprint.SPRINT_JUMP_HEIGHT_MODIFIER_COEFFICIENT = 1.1
minetest_wadsprint.SPRINT_STAMINA_DECREASE_PER_UPDATE_PERIOD_COEFFICIENT = 0.0005 -- 0.1 means 10% decrease

View File

@ -164,7 +164,7 @@ end
function minetest_wadsprint.set_sprinting_physics(player,is_on)
if player.is_sprinting_physics_on ~= is_on then
local physics = player.obj:get_physics_override()
if is_on then
if is_on == true then
player.obj:set_physics_override(
{
jump = physics.jump - 1 + minetest_wadsprint.SPRINT_JUMP_HEIGHT_MODIFIER_COEFFICIENT,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 522 B