From 0f68c8c7aeaa65f09802d5fa07267b46697e6777 Mon Sep 17 00:00:00 2001 From: mid <> Date: Wed, 14 Jan 2026 12:00:16 +0200 Subject: [PATCH] k3 interface update --- src/luaapi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/luaapi.c b/src/luaapi.c index 1b6f15f..1fc4b30 100644 --- a/src/luaapi.c +++ b/src/luaapi.c @@ -4392,7 +4392,11 @@ void luaapi_fillmaterial_direct(struct k3Mat *mat) { lua_pop(L, 1); lua_getfield(L, -1, "alphatest"); - mat->passes[0].alphatest = lua_toboolean(L, -1); + if(lua_type(L, -1) == LUA_TBOOLEAN) { + mat->passes[0].alphatest = lua_toboolean(L, -1); + } else { + mat->passes[0].alphatest = lua_tonumber(L, -1); + } lua_pop(L, 1); lua_getfield(L, -1, "depthwrite");