Ограничить движение при сидении на стуле
This commit is contained in:
parent
672d8ac2f7
commit
676ae03852
@ -27,7 +27,7 @@ function xdecor.sit(pos, node, clicker, pointed_thing)
|
||||
playerphysics.remove_physics_factor(clicker, "speed", "xdecor:sit_speed")
|
||||
playerphysics.remove_physics_factor(clicker, "jump", "xdecor:sit_jump")
|
||||
else
|
||||
clicker:set_physics_override({speed = 1, jump = 1})
|
||||
clicker:set_physics_override({ speed = 1, jump = 1, speed_walk = 1, speed_fast = 1, speed_crouch = 1 })
|
||||
end
|
||||
player_api.player_attached[player_name] = false
|
||||
player_api.set_animation(clicker, "stand", 30)
|
||||
@ -40,7 +40,7 @@ function xdecor.sit(pos, node, clicker, pointed_thing)
|
||||
playerphysics.add_physics_factor(clicker, "speed", "xdecor:sit_speed", 0)
|
||||
playerphysics.add_physics_factor(clicker, "jump", "xdecor:sit_jump", 0)
|
||||
else
|
||||
clicker:set_physics_override({speed = 0, jump = 0})
|
||||
clicker:set_physics_override({ speed = 0, jump = 0, speed_walk = 0, speed_fast = 0, speed_crouch = 0 })
|
||||
end
|
||||
clicker:set_pos(pos)
|
||||
player_api.player_attached[player_name] = true
|
||||
|
Loading…
Reference in New Issue
Block a user