Fix: Better readme.

master
aa6 2019-08-24 15:08:46 +03:00
parent 82f0a66192
commit bf9c339123
4 changed files with 19 additions and 18 deletions

View File

@ -26,10 +26,11 @@ Copy `config.lua` to `worlds/<worldname>/mod_minetest_wadsprint_config.lua` to c
**Dependencies**
All dependencies are optional.
All mod dependencies are optional.
- [hudbars?](http://repo.or.cz/minetest_hudbars.git)
- [hud?](https://github.com/BlockMen/hud_hunger)
- [hudbars?](http://repo.or.cz/minetest_hudbars.git)
- [player_monoids?](https://github.com/minetest-mods/player_monoids)
**Dependents**

View File

@ -1 +1 @@
0.10.4
0.10.5

View File

@ -126,6 +126,21 @@ function minetest_wadsprint.switch_to_walking(player)
end
end
----------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------- switch_to_sprinting() --
----------------------------------------------------------------------------------------------------
-- Sprinting means that player has altered physics and is moving forward. If player isn't moving
-- then he isn't sprinting.
function minetest_wadsprint.switch_to_sprinting(player)
if player.is_sprinting == false then
player.is_walking = false
player.is_sprinting = true
player.is_ready_to_sprint = false
minetest_wadsprint.set_sprinting_physics(player,true)
minetest_wadsprint.hudbar_update_ready_to_sprint(player)
minetest_wadsprint.hudbar_update_stamina(player)
end
end
----------------------------------------------------------------------------------------------------
--------------------------------------------------------------------- switch_to_ready_to_sprint() --
----------------------------------------------------------------------------------------------------
-- Main use of this function is to put player in a state when pressing "W" would trigger the
@ -146,21 +161,6 @@ function minetest_wadsprint.switch_to_ready_to_sprint(player)
end
end
----------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------- switch_to_sprinting() --
----------------------------------------------------------------------------------------------------
-- Sprinting means that player has altered physics and is moving forward. If player isn't moving
-- then he isn't sprinting.
function minetest_wadsprint.switch_to_sprinting(player)
if player.is_sprinting == false then
player.is_walking = false
player.is_sprinting = true
player.is_ready_to_sprint = false
minetest_wadsprint.set_sprinting_physics(player,true)
minetest_wadsprint.hudbar_update_ready_to_sprint(player)
minetest_wadsprint.hudbar_update_stamina(player)
end
end
----------------------------------------------------------------------------------------------------
------------------------------------------------------------------------- set_sprinting_physics() --
----------------------------------------------------------------------------------------------------
dofile(minetest.get_modpath(minetest.get_current_modname()).."/init_set_sprinting_physics.lua")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB