mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'on_physics_update' entity event
This commit is contained in:
parent
b60f0f0ea2
commit
6d3dac9106
6 changed files with 42 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ end
|
|||
def_prop("jump_force", 0.0)
|
||||
def_prop("air_damping", 1.0)
|
||||
def_prop("ground_damping", 1.0)
|
||||
def_prop("movement_speed", 4.0)
|
||||
def_prop("movement_speed", 3.0)
|
||||
def_prop("run_speed_mul", 1.5)
|
||||
def_prop("crouch_speed_mul", 0.35)
|
||||
def_prop("flight_speed_mul", 4.0)
|
||||
|
|
@ -56,7 +56,7 @@ function move_horizontal(speed, dir, vel)
|
|||
body:set_vel(vel)
|
||||
end
|
||||
|
||||
function on_update(tps)
|
||||
function on_physics_update(tps)
|
||||
local delta = (1.0 / tps)
|
||||
local pid = entity:get_player()
|
||||
if pid and hud and not hud.is_inventory_open() and not menu.page ~= "" then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue