mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +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 hudAvailable; // hud hooks field
|
||||||
|
|
||||||
|
static UINT8 camnum = 1;
|
||||||
|
|
||||||
// must match enum hud in lua_hud.h
|
// must match enum hud in lua_hud.h
|
||||||
static const char *const hud_disable_options[] = {
|
static const char *const hud_disable_options[] = {
|
||||||
"stagetitle",
|
"stagetitle",
|
||||||
|
@ -134,7 +136,8 @@ enum cameraf {
|
||||||
camera_height,
|
camera_height,
|
||||||
camera_momx,
|
camera_momx,
|
||||||
camera_momy,
|
camera_momy,
|
||||||
camera_momz
|
camera_momz,
|
||||||
|
camera_pnum
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,6 +156,7 @@ static const char *const camera_opt[] = {
|
||||||
"momx",
|
"momx",
|
||||||
"momy",
|
"momy",
|
||||||
"momz",
|
"momz",
|
||||||
|
"pnum",
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
static int lib_getHudInfo(lua_State *L)
|
static int lib_getHudInfo(lua_State *L)
|
||||||
|
@ -308,6 +312,9 @@ static int camera_get(lua_State *L)
|
||||||
case camera_momz:
|
case camera_momz:
|
||||||
lua_pushinteger(L, cam->momz);
|
lua_pushinteger(L, cam->momz);
|
||||||
break;
|
break;
|
||||||
|
case camera_pnum:
|
||||||
|
lua_pushinteger(L, camnum);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -772,13 +779,25 @@ void LUAh_GameHUD(player_t *stplayr)
|
||||||
LUA_PushUserdata(gL, stplayr, META_PLAYER);
|
LUA_PushUserdata(gL, stplayr, META_PLAYER);
|
||||||
|
|
||||||
if (splitscreen > 2 && stplayr == &players[fourthdisplayplayer])
|
if (splitscreen > 2 && stplayr == &players[fourthdisplayplayer])
|
||||||
|
{
|
||||||
LUA_PushUserdata(gL, &camera4, META_CAMERA);
|
LUA_PushUserdata(gL, &camera4, META_CAMERA);
|
||||||
|
camnum = 4;
|
||||||
|
}
|
||||||
else if (splitscreen > 1 && stplayr == &players[thirddisplayplayer])
|
else if (splitscreen > 1 && stplayr == &players[thirddisplayplayer])
|
||||||
|
{
|
||||||
LUA_PushUserdata(gL, &camera3, META_CAMERA);
|
LUA_PushUserdata(gL, &camera3, META_CAMERA);
|
||||||
|
camnum = 3;
|
||||||
|
}
|
||||||
else if (splitscreen && stplayr == &players[secondarydisplayplayer])
|
else if (splitscreen && stplayr == &players[secondarydisplayplayer])
|
||||||
|
{
|
||||||
LUA_PushUserdata(gL, &camera2, META_CAMERA);
|
LUA_PushUserdata(gL, &camera2, META_CAMERA);
|
||||||
|
camnum = 2;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
LUA_PushUserdata(gL, &camera, META_CAMERA);
|
LUA_PushUserdata(gL, &camera, META_CAMERA);
|
||||||
|
camnum = 1;
|
||||||
|
}
|
||||||
|
|
||||||
lua_pushnil(gL);
|
lua_pushnil(gL);
|
||||||
while (lua_next(gL, -5) != 0) {
|
while (lua_next(gL, -5) != 0) {
|
||||||
|
|
Loading…
Reference in a new issue