mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 22:22:25 +01:00
ecea5364f1
Better pathfinder algorithm, allows tuning the lag spike compensation. Smoother movement (when it's laggy). Set the player animation to stand on attach. Remove driver when they leave. Only update velocity when it's necessary.
17 lines
449 B
Lua
17 lines
449 B
Lua
|
|
carts = {}
|
|
carts.modpath = minetest.get_modpath("carts")
|
|
carts.railparams = {}
|
|
|
|
-- Maximal speed of the cart in m/s (min = -1)
|
|
carts.speed_max = 7
|
|
-- Set to -1 to disable punching the cart from inside (min = -1)
|
|
carts.punch_speed_max = 5
|
|
-- Maximal distance for the path correction (for dtime peaks)
|
|
carts.path_distance_max = 3
|
|
|
|
|
|
dofile(carts.modpath.."/functions.lua")
|
|
dofile(carts.modpath.."/rails.lua")
|
|
dofile(carts.modpath.."/cart_entity.lua")
|