mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add default physics variables
Co-authored-by: Yoruma <168607605+Mahoyomu@users.noreply.github.com>
This commit is contained in:
parent
29cfb6efff
commit
3118efdf1c
4 changed files with 45 additions and 0 deletions
29
builtin/game/default_physics.lua
Normal file
29
builtin/game/default_physics.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
-- Minetest: builtin/game/default_physics.lua
|
||||
|
||||
-- DEFAULT_PHYSICS variable of a player
|
||||
core.DEFAULT_PHYSICS = {
|
||||
speed = 1,
|
||||
speed_walk = 1,
|
||||
speed_climb = 1,
|
||||
speed_crouch = 1,
|
||||
speed_fast = 1,
|
||||
|
||||
jump = 1,
|
||||
gravity = 1,
|
||||
|
||||
liquid_fluidity = 1,
|
||||
liquid_fluidity_smooth = 1,
|
||||
liquid_sink = 1,
|
||||
|
||||
acceleration_default = 1,
|
||||
acceleration_air = 1,
|
||||
acceleration_fast = 1,
|
||||
|
||||
sneak = true,
|
||||
sneak_glitch = false,
|
||||
new_move = true,
|
||||
}
|
||||
|
||||
core.register_on_joinplayer(function(player)
|
||||
player:set_physics_override(core.DEFAULT_PHYSICS)
|
||||
end)
|
Loading…
Add table
Add a link
Reference in a new issue