mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
fix ffloor.toppic/bottompic to be consistent in behavior with sector.floorpic/ceilingpic
This commit is contained in:
parent
dfbbab35f4
commit
76fe78571e
1 changed files with 11 additions and 10 deletions
|
@ -1090,6 +1090,7 @@ static int ffloor_get(lua_State *L)
|
||||||
{
|
{
|
||||||
ffloor_t *ffloor = *((ffloor_t **)luaL_checkudata(L, 1, META_FFLOOR));
|
ffloor_t *ffloor = *((ffloor_t **)luaL_checkudata(L, 1, META_FFLOOR));
|
||||||
enum ffloor_e field = luaL_checkoption(L, 2, ffloor_opt[0], ffloor_opt);
|
enum ffloor_e field = luaL_checkoption(L, 2, ffloor_opt[0], ffloor_opt);
|
||||||
|
INT16 i;
|
||||||
|
|
||||||
if (!ffloor)
|
if (!ffloor)
|
||||||
{
|
{
|
||||||
|
@ -1109,11 +1110,11 @@ static int ffloor_get(lua_State *L)
|
||||||
lua_pushfixed(L, *ffloor->topheight);
|
lua_pushfixed(L, *ffloor->topheight);
|
||||||
return 1;
|
return 1;
|
||||||
case ffloor_toppic: { // toppic
|
case ffloor_toppic: { // toppic
|
||||||
levelflat_t *levelflat;
|
levelflat_t *levelflat = &levelflats[*ffloor->toppic];
|
||||||
INT16 i;
|
for (i = 0; i < 8; i++)
|
||||||
for (i = 0, levelflat = levelflats; i != *ffloor->toppic; i++, levelflat++)
|
if (!levelflat->name[i])
|
||||||
;
|
break;
|
||||||
lua_pushlstring(L, levelflat->name, 8);
|
lua_pushlstring(L, levelflat->name, i);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case ffloor_toplightlevel:
|
case ffloor_toplightlevel:
|
||||||
|
@ -1123,11 +1124,11 @@ static int ffloor_get(lua_State *L)
|
||||||
lua_pushfixed(L, *ffloor->bottomheight);
|
lua_pushfixed(L, *ffloor->bottomheight);
|
||||||
return 1;
|
return 1;
|
||||||
case ffloor_bottompic: { // bottompic
|
case ffloor_bottompic: { // bottompic
|
||||||
levelflat_t *levelflat;
|
levelflat_t *levelflat = &levelflats[*ffloor->bottompic];
|
||||||
INT16 i;
|
for (i = 0; i < 8; i++)
|
||||||
for (i = 0, levelflat = levelflats; i != *ffloor->bottompic; i++, levelflat++)
|
if (!levelflat->name[i])
|
||||||
;
|
break;
|
||||||
lua_pushlstring(L, levelflat->name, 8);
|
lua_pushlstring(L, levelflat->name, i);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
|
|
Loading…
Reference in a new issue