mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- minor bit of cleanup of tags code.
This commit is contained in:
parent
f983f778f2
commit
f65a07c952
4 changed files with 11 additions and 9 deletions
|
@ -830,6 +830,11 @@ bool sector_t::HasTag(int checktag) const
|
|||
return tag == checktag;
|
||||
}
|
||||
|
||||
bool sector_t::HasTags() const
|
||||
{
|
||||
return tag != 0;
|
||||
}
|
||||
|
||||
void sector_t::SetMainTag(int tagnum)
|
||||
{
|
||||
tag = tagnum;
|
||||
|
@ -864,11 +869,6 @@ void line_t::SetMainId(int newid)
|
|||
id = newid;
|
||||
}
|
||||
|
||||
int line_t::GetMainId() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
void line_t::ClearIds()
|
||||
{
|
||||
id = -1;
|
||||
|
|
|
@ -778,6 +778,7 @@ public:
|
|||
bool strifetrans = false;
|
||||
bool strifetrans2 = false;
|
||||
FString arg0str, arg1str;
|
||||
int lineid; // forZDoomTranslated namespace
|
||||
|
||||
memset(ld, 0, sizeof(*ld));
|
||||
ld->Alpha = FRACUNIT;
|
||||
|
@ -814,7 +815,8 @@ public:
|
|||
continue;
|
||||
|
||||
case NAME_Id:
|
||||
ld->SetMainId(CheckInt(key));
|
||||
lineid = CheckInt(key);
|
||||
ld->SetMainId(lineid);
|
||||
continue;
|
||||
|
||||
case NAME_Sidefront:
|
||||
|
@ -1067,7 +1069,7 @@ public:
|
|||
maplinedef_t mld;
|
||||
memset(&mld, 0, sizeof(mld));
|
||||
mld.special = ld->special;
|
||||
mld.tag = ld->GetMainId();
|
||||
mld.tag = lineid;
|
||||
P_TranslateLineDef(ld, &mld, false);
|
||||
ld->flags = saved | (ld->flags&(ML_MONSTERSCANACTIVATE|ML_REPEAT_SPECIAL|ML_FIRSTSIDEONLY));
|
||||
}
|
||||
|
|
|
@ -307,7 +307,7 @@ void P_TranslateTeleportThings ()
|
|||
|
||||
while ( (dest = iterator.Next()) )
|
||||
{
|
||||
if (dest->Sector->GetMainTag() == 0)
|
||||
if (!dest->Sector->HasTags())
|
||||
{
|
||||
dest->tid = 1;
|
||||
dest->AddToHash ();
|
||||
|
|
|
@ -634,6 +634,7 @@ struct sector_t
|
|||
}
|
||||
|
||||
bool HasTag(int checktag) const;
|
||||
bool HasTags() const;
|
||||
void SetMainTag(int tagnum);
|
||||
int GetMainTag() const;
|
||||
void ClearTags();
|
||||
|
@ -908,7 +909,6 @@ struct line_t
|
|||
|
||||
|
||||
void SetMainId(int newid);
|
||||
int GetMainId() const;
|
||||
void ClearIds();
|
||||
bool HasId(int id) const;
|
||||
static void HashIds();
|
||||
|
|
Loading…
Reference in a new issue