- some minor rework of tag access interface after I realized that some stuff (e.g. Strife's scrolling sector special) need the primary tag to treated specially.

This commit is contained in:
Christoph Oelckers 2015-04-14 18:48:19 +02:00
commit 2faf836aa1
10 changed files with 23 additions and 15 deletions

View file

@ -1158,7 +1158,7 @@ void FParser::SF_ObjSector(void)
}
t_return.type = svt_int;
t_return.value.i = mo ? mo->Sector->GetTag() : 0; // nullptr check
t_return.value.i = mo ? mo->Sector->GetMainTag() : 0; // nullptr check
}
//==========================================================================
@ -4388,7 +4388,8 @@ void FParser::SF_ChangeTag()
{
for (int secnum = -1; (secnum = P_FindSectorFromTag (t_argv[0].value.i, secnum)) >= 0; )
{
sectors[secnum].SetTag(t_argv[1].value.i);
sectors[secnum].ClearTags();
sectors[secnum].SetMainTag(t_argv[1].value.i);
}
sector_t::HashTags();
}