1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-07-22 18:10:30 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
9f02777f14 re-add nil check for get_distance function 2020-08-20 20:29:34 +01:00
ae62b1410d update api.txt 2020-08-19 12:07:44 +01:00
2 changed files with 3 additions and 2 deletions

View File

@ -196,7 +196,7 @@ end
-- calculate distance
local get_distance = function(a, b)
-- if not a or not b then return 50 end -- nil check
if not a or not b then return 50 end -- nil check
local x, y, z = a.x - b.x, a.y - b.y, a.z - b.z

View File

@ -199,7 +199,8 @@ functions needed for the mob to work properly which contains the following:
'double_melee_attack' when true has the api choose between 'punch' and
'punch2' animations. [DEPRECATED]
'animation' holds a table containing animation names and settings for use with mesh models:
'animation' holds a table containing animation names and settings for use with
mesh models:
'stand_start' start frame for when mob stands still.
'stand_end' end frame of stand animation.
'stand_speed' speed of animation in frames per second.