diff --git a/src/lua_maplib.c b/src/lua_maplib.c index a3bdd9aa8..a6b45e406 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -537,7 +537,7 @@ static int sector_get(lua_State *L) lua_pushinteger(L, sector->special); return 1; case sector_tag: - lua_pushinteger(L, sector->tag); + lua_pushinteger(L, Tag_FGet(§or->tags)); return 1; case sector_thinglist: // thinglist lua_pushcfunction(L, lib_iterateSectorThinglist); @@ -636,7 +636,7 @@ static int sector_set(lua_State *L) sector->special = (INT16)luaL_checkinteger(L, 3); break; case sector_tag: - P_ChangeSectorTag((UINT32)(sector - sectors), (INT16)luaL_checkinteger(L, 3)); + Tag_SectorFSet((UINT32)(sector - sectors), (INT16)luaL_checkinteger(L, 3)); break; } return 0; @@ -770,7 +770,7 @@ static int line_get(lua_State *L) lua_pushinteger(L, line->special); return 1; case line_tag: - lua_pushinteger(L, line->tag); + lua_pushinteger(L, Tag_FGet(&line->tags)); return 1; case line_args: LUA_PushUserdata(L, line->args, META_LINEARGS); diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c index 8d2aad91e..127ba607c 100644 --- a/src/lua_mobjlib.c +++ b/src/lua_mobjlib.c @@ -780,7 +780,7 @@ static int mapthing_get(lua_State *L) else if(fastcmp(field,"extrainfo")) number = mt->extrainfo; else if(fastcmp(field,"tag")) - number = mt->tag; + number = Tag_FGet(&mt->tags); else if(fastcmp(field,"mobj")) { LUA_PushUserdata(L, mt->mobj, META_MOBJ); return 1; @@ -824,7 +824,7 @@ static int mapthing_set(lua_State *L) mt->extrainfo = (UINT8)extrainfo; } else if (fastcmp(field,"tag")) - mt->tag = (INT16)luaL_checkinteger(L, 3); + Tag_FSet(&mt->tags, (INT16)luaL_checkinteger(L, 3)); else if(fastcmp(field,"mobj")) mt->mobj = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ)); else