From 971d68643717cf4ac65c7613b54aaf5a83fca9f1 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 2 Mar 2023 22:56:55 -0800 Subject: [PATCH] LUA_EvalMath: load math lib --- src/lua_script.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lua_script.c b/src/lua_script.c index ed35d9e69..17abc7384 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -699,6 +699,10 @@ fixed_t LUA_EvalMath(const char *word) lua_pushboolean(L, true); lua_call(L, 1, 0); + lua_pushcfunction(L, LUA_MathLib); + lua_pushboolean(L, true); + lua_call(L, 1, 0); + // change ^ into ^^ for Lua. strcpy(buf, "return "); b = buf+strlen(buf);