mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 06:00:45 +00:00
Merge branch 'expos-local' into 'next'
Expose P_IsLocalPlayer to Lua See merge request STJr/SRB2!1997
This commit is contained in:
commit
484a9c5620
1 changed files with 12 additions and 0 deletions
|
@ -1346,6 +1346,17 @@ static int lib_pSetObjectMomZ(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_pIsLocalPlayer(lua_State *L)
|
||||||
|
{
|
||||||
|
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
|
//NOHUD
|
||||||
|
//INLEVEL
|
||||||
|
if (!player)
|
||||||
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
|
lua_pushboolean(L, P_IsLocalPlayer(player));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int lib_pPlayJingle(lua_State *L)
|
static int lib_pPlayJingle(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = NULL;
|
player_t *player = NULL;
|
||||||
|
@ -4277,6 +4288,7 @@ static luaL_Reg lib[] = {
|
||||||
{"P_InQuicksand",lib_pInQuicksand},
|
{"P_InQuicksand",lib_pInQuicksand},
|
||||||
{"P_InJumpFlipSector",lib_pInJumpFlipSector},
|
{"P_InJumpFlipSector",lib_pInJumpFlipSector},
|
||||||
{"P_SetObjectMomZ",lib_pSetObjectMomZ},
|
{"P_SetObjectMomZ",lib_pSetObjectMomZ},
|
||||||
|
{"P_IsLocalPlayer",lib_pIsLocalPlayer},
|
||||||
{"P_PlayJingle",lib_pPlayJingle},
|
{"P_PlayJingle",lib_pPlayJingle},
|
||||||
{"P_PlayJingleMusic",lib_pPlayJingleMusic},
|
{"P_PlayJingleMusic",lib_pPlayJingleMusic},
|
||||||
{"P_RestoreMusic",lib_pRestoreMusic},
|
{"P_RestoreMusic",lib_pRestoreMusic},
|
||||||
|
|
Loading…
Reference in a new issue