k3 interface update

This commit is contained in:
mid 2026-01-14 12:00:16 +02:00
parent 2211193a96
commit 0f68c8c7ae

View File

@ -4392,7 +4392,11 @@ void luaapi_fillmaterial_direct(struct k3Mat *mat) {
lua_pop(L, 1); lua_pop(L, 1);
lua_getfield(L, -1, "alphatest"); 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_pop(L, 1);
lua_getfield(L, -1, "depthwrite"); lua_getfield(L, -1, "depthwrite");