mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-29 07:32:02 +00:00
Expose P_ResetCamera to Lua
This commit is contained in:
parent
d6d424f102
commit
610effb8ea
1 changed files with 14 additions and 0 deletions
|
@ -1641,6 +1641,19 @@ static int lib_pHomingAttack(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_pResetCamera(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
camera_t *cam = *((camera_t **)luaL_checkudata(L, 2, META_CAMERA));
|
||||
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
if (!cam)
|
||||
return LUA_ErrInvalid(L, "camera_t");
|
||||
P_ResetCamera(player, cam);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lib_pSuperReady(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
|
@ -4109,6 +4122,7 @@ static luaL_Reg lib[] = {
|
|||
{"P_NukeEnemies",lib_pNukeEnemies},
|
||||
{"P_Earthquake",lib_pEarthquake},
|
||||
{"P_HomingAttack",lib_pHomingAttack},
|
||||
{"P_ResetCamera",lib_pResetCamera},
|
||||
{"P_SuperReady",lib_pSuperReady},
|
||||
{"P_DoJump",lib_pDoJump},
|
||||
{"P_SpawnThokMobj",lib_pSpawnThokMobj},
|
||||
|
|
Loading…
Reference in a new issue