Fix: BAD_PHYSICS_OVERRIDE_MODE is now a default.
parent
d8ee43a6e2
commit
4745ec0115
|
@ -4,7 +4,6 @@
|
|||
minetest_wadsprint.HIDE_HUD_BARS = false
|
||||
minetest_wadsprint.STAMINA_MAX_VALUE = 100
|
||||
minetest_wadsprint.DYSPNEA_THRESHOLD_VALUE = 3
|
||||
minetest_wadsprint.BAD_PHYSICS_OVERRIDE_MODE = false
|
||||
minetest_wadsprint.SAVE_PLAYERS_STATS_TO_FILE = true
|
||||
minetest_wadsprint.PLAYERS_STATS_FILE_LIMIT_RECORDS = 1000
|
||||
minetest_wadsprint.PLAYER_STATS_UPDATE_PERIOD_SECONDS = 1
|
||||
|
|
|
@ -1,26 +1,4 @@
|
|||
if minetest_wadsprint.BAD_PHYSICS_OVERRIDE_MODE == true then
|
||||
|
||||
function minetest_wadsprint.set_sprinting_physics(player,is_on_val)
|
||||
if player.is_sprinting_physics_on ~= is_on_val then
|
||||
local physics = player.obj:get_physics_override()
|
||||
if is_on_val == true then
|
||||
player.obj:set_physics_override(
|
||||
{
|
||||
jump = (round(physics.jump,0.01) - 1 + minetest_wadsprint.SPRINT_JUMP_HEIGHT_BOOST_COEFFICIENT),
|
||||
speed = (round(physics.speed,0.01) - 1 + minetest_wadsprint.SPRINT_RUN_SPEED_BOOST_COEFFICIENT),
|
||||
})
|
||||
elseif player.is_sprinting_physics_on ~= nil then
|
||||
player.obj:set_physics_override(
|
||||
{
|
||||
jump = 1,
|
||||
speed = 1,
|
||||
})
|
||||
end
|
||||
player.is_sprinting_physics_on = is_on_val
|
||||
end
|
||||
end
|
||||
|
||||
elseif minetest.get_modpath("player_monoids") ~= nil then
|
||||
if minetest.get_modpath("player_monoids") ~= nil then
|
||||
|
||||
local default_minetest_wadsprint_initialize_player = minetest_wadsprint.initialize_player
|
||||
function minetest_wadsprint.initialize_player(player_obj)
|
||||
|
@ -66,14 +44,14 @@ else
|
|||
if is_on_val == true then
|
||||
player.obj:set_physics_override(
|
||||
{
|
||||
jump = (round(physics.jump,0.01) - 1 + minetest_wadsprint.SPRINT_JUMP_HEIGHT_BOOST_COEFFICIENT),
|
||||
speed = (round(physics.speed,0.01) - 1 + minetest_wadsprint.SPRINT_RUN_SPEED_BOOST_COEFFICIENT),
|
||||
jump = minetest_wadsprint.SPRINT_JUMP_HEIGHT_BOOST_COEFFICIENT,
|
||||
speed = minetest_wadsprint.SPRINT_RUN_SPEED_BOOST_COEFFICIENT,
|
||||
})
|
||||
elseif player.is_sprinting_physics_on ~= nil then
|
||||
player.obj:set_physics_override(
|
||||
{
|
||||
jump = (round(physics.jump,0.01) + 1 - minetest_wadsprint.SPRINT_JUMP_HEIGHT_BOOST_COEFFICIENT),
|
||||
speed = (round(physics.speed,0.01) + 1 - minetest_wadsprint.SPRINT_RUN_SPEED_BOOST_COEFFICIENT),
|
||||
jump = 1,
|
||||
speed = 1,
|
||||
})
|
||||
end
|
||||
player.is_sprinting_physics_on = is_on_val
|
||||
|
|
|
@ -4,9 +4,6 @@ minetest_wadsprint.ENABLE_INGAME_SETTINGS (ENABLE ALL THE MOD SETTINGS BELOW) bo
|
|||
# If enabled, stamina HUD bar will not be shown.
|
||||
minetest_wadsprint.HIDE_HUD_BARS (Hide HUD bars) bool false
|
||||
|
||||
# Can be used to establish compatibility with mods that don't support proper physics change or monoids. Strongly not recommended in other cases.
|
||||
minetest_wadsprint.BAD_PHYSICS_OVERRIDE_MODE (Bad physics override mode) bool false
|
||||
|
||||
# Absolutely arbitrary value to make calculations more convenient.
|
||||
minetest_wadsprint.STAMINA_MAX_VALUE (Stamina max value in points) int 100
|
||||
|
||||
|
|
BIN
util/version.png
BIN
util/version.png
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue