mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
fix missing core:mob 'get_dir' function
This commit is contained in:
parent
83f7146a14
commit
1c54de2d76
1 changed files with 5 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ end
|
||||||
|
|
||||||
function move_vertical(speed, vel)
|
function move_vertical(speed, vel)
|
||||||
vel = vel or body:get_vel()
|
vel = vel or body:get_vel()
|
||||||
|
speed = speed or 1.0
|
||||||
vel[2] = vel[2] * 0.2 + props.movement_speed * speed * 0.8
|
vel[2] = vel[2] * 0.2 + props.movement_speed * speed * 0.8
|
||||||
body:set_vel(vel)
|
body:set_vel(vel)
|
||||||
end
|
end
|
||||||
|
|
@ -145,6 +146,10 @@ function set_dir(new_dir)
|
||||||
dir = new_dir
|
dir = new_dir
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function get_dir()
|
||||||
|
return dir
|
||||||
|
end
|
||||||
|
|
||||||
function is_flight() return flight end
|
function is_flight() return flight end
|
||||||
|
|
||||||
function set_flight(flag) flight = flag end
|
function set_flight(flag) flight = flag end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue