From 32be6f26b668f1fb290841883dfbc4d0eba972f2 Mon Sep 17 00:00:00 2001 From: Riceball LEE Date: Thu, 14 Jul 2022 11:57:19 +0800 Subject: [PATCH] fix: Lua: Runtime error from mod 'animalia' attempt to call global 'cos'/'sin'/'vec_center' (a nil value) --- api/behaviors.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/behaviors.lua b/api/behaviors.lua index 545a635..2796dd4 100644 --- a/api/behaviors.lua +++ b/api/behaviors.lua @@ -9,6 +9,9 @@ local random = math.random local ceil = math.ceil local floor = math.floor local rad = math.rad +local cos = math.cos +local sin = math.sin +local vec_center = creatura.vec_center local function average(t) local sum = 0 @@ -1620,4 +1623,4 @@ creatura.register_utility("animalia:mount", function(self, player) end end self:set_utility(func) -end) \ No newline at end of file +end)