mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-30 11:42:48 +00:00
Fix cup->cachedlevels Lua getter to return entire cachedlevels list.
This commit is contained in:
parent
add76b17aa
commit
d363c71007
1 changed files with 2 additions and 3 deletions
|
|
@ -351,13 +351,12 @@ static int cup_get(lua_State *L)
|
|||
lua_pushstring(L, cup->levellist[i]);
|
||||
lua_rawseti(L, -2, 1 + i);
|
||||
}
|
||||
//return UNIMPLEMENTED;
|
||||
break;
|
||||
case cup_cachedlevels:
|
||||
lua_createtable(L, ((cup->numlevels) + (cup->numbonus)), 0);
|
||||
for (size_t i = 0; i < ((cup->numlevels) + (cup->numbonus)); i++)
|
||||
for (size_t i = 0; i < CUPCACHE_MAX; i++)
|
||||
{
|
||||
lua_pushnumber(L, cup->cachedlevels[i]);
|
||||
lua_pushnumber(L, (cup->cachedlevels[i])+1);
|
||||
lua_rawseti(L, -2, 1 + i);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue