mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
Merge branch 'notluaconsoleplayer' into 'next'
Not Lua Consoleplayer See merge request KartKrew/Kart-Public!38
This commit is contained in:
commit
ce8239f3f7
1 changed files with 20 additions and 1 deletions
|
@ -34,6 +34,8 @@ static UINT8 hud_enabled[(hud_MAX/8)+1];
|
|||
|
||||
static UINT8 hudAvailable; // hud hooks field
|
||||
|
||||
static UINT8 camnum = 1;
|
||||
|
||||
// must match enum hud in lua_hud.h
|
||||
static const char *const hud_disable_options[] = {
|
||||
"stagetitle",
|
||||
|
@ -134,7 +136,8 @@ enum cameraf {
|
|||
camera_height,
|
||||
camera_momx,
|
||||
camera_momy,
|
||||
camera_momz
|
||||
camera_momz,
|
||||
camera_pnum
|
||||
};
|
||||
|
||||
|
||||
|
@ -153,6 +156,7 @@ static const char *const camera_opt[] = {
|
|||
"momx",
|
||||
"momy",
|
||||
"momz",
|
||||
"pnum",
|
||||
NULL};
|
||||
|
||||
static int lib_getHudInfo(lua_State *L)
|
||||
|
@ -308,6 +312,9 @@ static int camera_get(lua_State *L)
|
|||
case camera_momz:
|
||||
lua_pushinteger(L, cam->momz);
|
||||
break;
|
||||
case camera_pnum:
|
||||
lua_pushinteger(L, camnum);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -772,13 +779,25 @@ void LUAh_GameHUD(player_t *stplayr)
|
|||
LUA_PushUserdata(gL, stplayr, META_PLAYER);
|
||||
|
||||
if (splitscreen > 2 && stplayr == &players[fourthdisplayplayer])
|
||||
{
|
||||
LUA_PushUserdata(gL, &camera4, META_CAMERA);
|
||||
camnum = 4;
|
||||
}
|
||||
else if (splitscreen > 1 && stplayr == &players[thirddisplayplayer])
|
||||
{
|
||||
LUA_PushUserdata(gL, &camera3, META_CAMERA);
|
||||
camnum = 3;
|
||||
}
|
||||
else if (splitscreen && stplayr == &players[secondarydisplayplayer])
|
||||
{
|
||||
LUA_PushUserdata(gL, &camera2, META_CAMERA);
|
||||
camnum = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
LUA_PushUserdata(gL, &camera, META_CAMERA);
|
||||
camnum = 1;
|
||||
}
|
||||
|
||||
lua_pushnil(gL);
|
||||
while (lua_next(gL, -5) != 0) {
|
||||
|
|
Loading…
Reference in a new issue