Fix: Better readme.
parent
82f0a66192
commit
bf9c339123
|
@ -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**
|
||||
|
||||
|
|
30
init.lua
30
init.lua
|
@ -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")
|
||||
|
|
BIN
util/version.png
BIN
util/version.png
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue