mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'expose-whip-to-lua' into 'master'
Concept - Expose Instawhip mobj to Lua See merge request KartKrew/RingRacers!91
This commit is contained in:
commit
5be908d7ac
1 changed files with 9 additions and 0 deletions
|
|
@ -684,6 +684,8 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->griefWarned);
|
lua_pushinteger(L, plr->griefWarned);
|
||||||
else if (fastcmp(field,"splitscreenindex"))
|
else if (fastcmp(field,"splitscreenindex"))
|
||||||
lua_pushinteger(L, plr->splitscreenindex);
|
lua_pushinteger(L, plr->splitscreenindex);
|
||||||
|
else if (fastcmp(field,"whip"))
|
||||||
|
LUA_PushUserdata(L, plr->whip, META_MOBJ);
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
else if (fastcmp(field,"fovadd"))
|
else if (fastcmp(field,"fovadd"))
|
||||||
lua_pushfixed(L, plr->fovadd);
|
lua_pushfixed(L, plr->fovadd);
|
||||||
|
|
@ -1241,6 +1243,13 @@ static int player_set(lua_State *L)
|
||||||
plr->griefWarned = luaL_checkinteger(L, 3);
|
plr->griefWarned = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"splitscreenindex"))
|
else if (fastcmp(field,"splitscreenindex"))
|
||||||
return NOSET;
|
return NOSET;
|
||||||
|
else if (fastcmp(field,"whip"))
|
||||||
|
{
|
||||||
|
mobj_t *mo = NULL;
|
||||||
|
if (!lua_isnil(L, 3))
|
||||||
|
mo = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
|
||||||
|
P_SetTarget(&plr->whip, mo);
|
||||||
|
}
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
else if (fastcmp(field,"fovadd"))
|
else if (fastcmp(field,"fovadd"))
|
||||||
plr->fovadd = luaL_checkfixed(L, 3);
|
plr->fovadd = luaL_checkfixed(L, 3);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue