SETTINGS: add new MT 5.9 physics overrides (closes #337)
This commit is contained in:
parent
f40ed854d0
commit
e250806ac3
@ -8,6 +8,8 @@ arena_lib.DEFAULT_ENTRANCE = "sign"
|
||||
-- https://gitlab.com/zughy-friends-minetest/hub
|
||||
arena_lib.SERVER_PHYSICS = {
|
||||
speed = 1,
|
||||
speed_walk = 1,
|
||||
speed_fast = 1,
|
||||
jump = 1,
|
||||
gravity = 1,
|
||||
speed_climb = 1,
|
||||
@ -17,6 +19,7 @@ arena_lib.SERVER_PHYSICS = {
|
||||
liquid_sink = 1,
|
||||
acceleration_default = 1,
|
||||
acceleration_air = 1,
|
||||
acceleration_fast = 1,
|
||||
sneak = true,
|
||||
sneak_glitch = false,
|
||||
new_move = true
|
||||
|
@ -128,6 +128,20 @@ if not arena_lib.SERVER_PHYSICS.speed_climb and not arena_lib.SERVER_PHYSICS.acc
|
||||
minetest.log("action", "[ARENA_LIB] Settings: SERVER_PHYSICS has been updated with the new Minetest physics parameters")
|
||||
end
|
||||
|
||||
-- same as above
|
||||
if not arena_lib.SERVER_PHYSICS.speed_fast and not arena_lib.SERVER_PHYSICS.acceleration_fast then
|
||||
local settings = io.open(minetest.get_worldpath() .. "/arena_lib/SETTINGS.lua", "r")
|
||||
local txt = settings:read("*all")
|
||||
|
||||
settings:close()
|
||||
|
||||
txt = txt:gsub("jump = ", "speed_walk = 1,\n speed_fast = 1,\n jump = ")
|
||||
txt = txt:gsub("sneak = ", "acceleration_fast = 1,\n sneak = ")
|
||||
|
||||
minetest.safe_file_write(minetest.get_worldpath() .. "/arena_lib/SETTINGS.lua", txt)
|
||||
minetest.log("action", "[ARENA_LIB] Settings: SERVER_PHYSICS has been updated with the new Minetest physics parameters")
|
||||
end
|
||||
|
||||
add_new_parameter("RESET_NODES_PER_TICK", {
|
||||
"-- For minigames with map regeneration enabled. The amount of nodes to reset on",
|
||||
"-- each step. The higher you set it the faster it'll go, but it'll also increase lag",
|
||||
|
Loading…
x
Reference in New Issue
Block a user