mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make it through Lua
This commit is contained in:
parent
a93acd1958
commit
d165e723be
4 changed files with 6 additions and 8 deletions
|
|
@ -122,7 +122,7 @@ static int lib_fixedsqrt(lua_State *L)
|
|||
|
||||
static int lib_fixedhypot(lua_State *L)
|
||||
{
|
||||
lua_pushfixed(L, R_PointToDist2(0, 0, luaL_checkfixed(L, 1), luaL_checkfixed(L, 2)));
|
||||
lua_pushfixed(L, FixedHypot(luaL_checkfixed(L, 1), luaL_checkfixed(L, 2)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -195,8 +195,6 @@ static luaL_Reg lib[] = {
|
|||
{"fixint" , lib_fixedint},
|
||||
{"FixedDiv", lib_fixeddiv},
|
||||
{"fixdiv" , lib_fixeddiv},
|
||||
{"FixedRem", lib_fixedrem},
|
||||
{"fixrem" , lib_fixedrem},
|
||||
{"FixedSqrt", lib_fixedsqrt},
|
||||
{"fixsqrt" , lib_fixedsqrt},
|
||||
{"FixedHypot", lib_fixedhypot},
|
||||
|
|
|
|||
|
|
@ -430,6 +430,8 @@ int LUA_WriteGlobals(lua_State *L, const char *word)
|
|||
gravity = (fixed_t)luaL_checkinteger(L, 2);
|
||||
else if (fastcmp(word, "stoppedclock"))
|
||||
stoppedclock = luaL_checkboolean(L, 2);
|
||||
/*
|
||||
// KART TODO: displayplayers is a table...
|
||||
else if (fastcmp(word, "displayplayer"))
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
|
||||
|
|
@ -437,6 +439,7 @@ int LUA_WriteGlobals(lua_State *L, const char *word)
|
|||
if (player)
|
||||
displayplayer = player - players;
|
||||
}
|
||||
*/
|
||||
else if (fastcmp(word, "mapmusname"))
|
||||
{
|
||||
size_t strlength;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ enum skin {
|
|||
skin_highresscale,
|
||||
skin_rivals,
|
||||
skin_soundsid,
|
||||
skin_availability,
|
||||
skin_sprites
|
||||
};
|
||||
static const char *const skin_opt[] = {
|
||||
|
|
@ -55,7 +54,6 @@ static const char *const skin_opt[] = {
|
|||
"highresscale",
|
||||
"rivals",
|
||||
"soundsid",
|
||||
"availability",
|
||||
"sprites",
|
||||
NULL
|
||||
};
|
||||
|
|
@ -119,9 +117,6 @@ static int skin_get(lua_State *L)
|
|||
case skin_soundsid:
|
||||
LUA_PushUserdata(L, skin->soundsid, META_SOUNDSID);
|
||||
break;
|
||||
case skin_availability:
|
||||
lua_pushinteger(L, skin->availability);
|
||||
break;
|
||||
case skin_sprites:
|
||||
LUA_PushLightUserdata(L, skin->sprites, META_SKINSPRITES);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@
|
|||
INT32 numskins = 0;
|
||||
skin_t skins[MAXSKINS];
|
||||
|
||||
INT32 numfollowers = 0;
|
||||
|
||||
// FIXTHIS: don't work because it must be inistilised before the config load
|
||||
//#define SKINVALUES
|
||||
#ifdef SKINVALUES
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue