Fix returned mobj/state index in compatmode
This commit is contained in:
parent
711944350e
commit
4e66cb67a8
1 changed files with 8 additions and 0 deletions
|
|
@ -53,6 +53,14 @@ static inline int lib_freeslot(lua_State *L)
|
|||
INT32 index;
|
||||
if (!DEH_ReadFreeslot(type, word, &index))
|
||||
{
|
||||
if (lua_compatmode)
|
||||
{
|
||||
if (fastcmp(type, "MT"))
|
||||
index -= MT_FIRSTFREESLOT;
|
||||
if (fastcmp(type, "S"))
|
||||
index -= S_FIRSTFREESLOT;
|
||||
}
|
||||
|
||||
lua_pushinteger(L, index);
|
||||
r++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue