mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
Expose K_GetTerrainForTextureNum to Lua
This commit is contained in:
parent
f3c6d6b9ca
commit
60ad342aca
1 changed files with 8 additions and 0 deletions
|
|
@ -4336,6 +4336,13 @@ static int lib_kGetTerrainForTextureName(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_kGetTerrainForTextureNum(lua_State *L)
|
||||||
|
{
|
||||||
|
INT32 id = luaL_checkinteger(L, 1);
|
||||||
|
LUA_PushUserdata(L, K_GetTerrainForTextureNum(id), META_TERRAIN);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static luaL_Reg lib[] = {
|
static luaL_Reg lib[] = {
|
||||||
{"print", lib_print},
|
{"print", lib_print},
|
||||||
{"chatprint", lib_chatprint},
|
{"chatprint", lib_chatprint},
|
||||||
|
|
@ -4653,6 +4660,7 @@ static luaL_Reg lib[] = {
|
||||||
// k_terrain
|
// k_terrain
|
||||||
{"K_GetDefaultTerrain", lib_kGetDefaultTerrain},
|
{"K_GetDefaultTerrain", lib_kGetDefaultTerrain},
|
||||||
{"K_GetTerrainForTextureName", lib_kGetTerrainForTextureName},
|
{"K_GetTerrainForTextureName", lib_kGetTerrainForTextureName},
|
||||||
|
{"K_GetTerrainForTextureNum", lib_kGetTerrainForTextureNum},
|
||||||
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue