mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Expose K_GetTerrainForTextureName to Lua
This commit is contained in:
parent
c73c4f904f
commit
f3c6d6b9ca
1 changed files with 8 additions and 0 deletions
|
|
@ -4329,6 +4329,13 @@ static int lib_kGetDefaultTerrain(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_kGetTerrainForTextureName(lua_State *L)
|
||||||
|
{
|
||||||
|
const char *str = luaL_checkstring(L, 1);
|
||||||
|
LUA_PushUserdata(L, K_GetTerrainForTextureName(str), META_TERRAIN);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static luaL_Reg lib[] = {
|
static luaL_Reg lib[] = {
|
||||||
{"print", lib_print},
|
{"print", lib_print},
|
||||||
{"chatprint", lib_chatprint},
|
{"chatprint", lib_chatprint},
|
||||||
|
|
@ -4645,6 +4652,7 @@ static luaL_Reg lib[] = {
|
||||||
|
|
||||||
// k_terrain
|
// k_terrain
|
||||||
{"K_GetDefaultTerrain", lib_kGetDefaultTerrain},
|
{"K_GetDefaultTerrain", lib_kGetDefaultTerrain},
|
||||||
|
{"K_GetTerrainForTextureName", lib_kGetTerrainForTextureName},
|
||||||
|
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue