mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Expose K_TerrainHasAffect to Lua
This commit is contained in:
parent
28fa210be5
commit
858fd5a3f3
1 changed files with 16 additions and 0 deletions
|
|
@ -4414,6 +4414,21 @@ static int lib_kUpdateTerrainOverlay(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_kTerrainHasAffect(lua_State *L)
|
||||
{
|
||||
terrain_t *terrain = *((terrain_t **)luaL_checkudata(L, 1, META_TERRAIN));
|
||||
boolean badonly = lua_optboolean(L, 2);
|
||||
|
||||
NOHUD
|
||||
INLEVEL
|
||||
|
||||
if (!terrain)
|
||||
return LUA_ErrInvalid(L, "terrain_t");
|
||||
|
||||
lua_pushboolean(L, K_TerrainHasAffect(terrain, badonly));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static luaL_Reg lib[] = {
|
||||
{"print", lib_print},
|
||||
{"chatprint", lib_chatprint},
|
||||
|
|
@ -4737,6 +4752,7 @@ static luaL_Reg lib[] = {
|
|||
{"K_SpawnSplashForMobj", lib_kSpawnSplashForMobj},
|
||||
{"K_HandleFootstepParticles", lib_kHandleFootstepParticles},
|
||||
{"K_UpdateTerrainOverlay", lib_kUpdateTerrainOverlay},
|
||||
{"K_TerrainHasAffect", lib_kTerrainHasAffect},
|
||||
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue