mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'cachedlevels-lua-why-broke' into 'master'
Fix cup->cachedlevels Lua getter to return entire cachedlevels list. See merge request kart-krew-dev/ring-racers!73
This commit is contained in:
commit
176713d243
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