mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-26 03:00:55 +00:00
Add P_SpawnSpinMobj to base library.
This commit is contained in:
parent
3f1038dcbe
commit
5316f8da96
1 changed files with 15 additions and 0 deletions
|
@ -756,6 +756,20 @@ static int lib_pSpawnThokMobj(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_pSpawnSpinMobj(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
mobjtype_t type = luaL_checkinteger(L, 2);
|
||||
NOHUD
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
if (type > MT_LASTFREESLOT)
|
||||
return luaL_error(L, "mobjtype_t out of bounds error!");
|
||||
P_SpawnSpinMobj(player, type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// P_MAP
|
||||
///////////
|
||||
|
||||
|
@ -1653,6 +1667,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_SuperReady",lib_pSuperReady},
|
||||
{"P_DoJump",lib_pDoJump},
|
||||
{"P_SpawnThokMobj",lib_pSpawnThokMobj},
|
||||
{"P_SpawnSpinMobj",lib_pSpawnSpinMobj},
|
||||
|
||||
// p_map
|
||||
{"P_CheckPosition",lib_pCheckPosition},
|
||||
|
|
Loading…
Reference in a new issue