- fix the compat_pointonline flag.
This commit is contained in:
parent
7606b22d0b
commit
5da2ecda66
4 changed files with 38 additions and 23 deletions
|
|
@ -2119,8 +2119,35 @@ int FLevelLocals::GetInfighting()
|
|||
void FLevelLocals::SetCompatLineOnSide(bool state)
|
||||
{
|
||||
int on = (state && (i_compatflags2 & COMPATF2_POINTONLINE));
|
||||
if (on) for (auto l : lines) l.flags |= ML_COMPATSIDE;
|
||||
else for (auto l : lines) l.flags &= ML_COMPATSIDE;
|
||||
if (on) for (auto &l : lines) l.flags |= ML_COMPATSIDE;
|
||||
else for (auto &l : lines) l.flags &= ~ML_COMPATSIDE;
|
||||
}
|
||||
|
||||
int FLevelLocals::GetCompatibility(int mask)
|
||||
{
|
||||
if (info == nullptr) return mask;
|
||||
else return (mask & ~info->compatmask) | (info->compatflags & info->compatmask);
|
||||
}
|
||||
|
||||
int FLevelLocals::GetCompatibility2(int mask)
|
||||
{
|
||||
return (info == nullptr) ? mask
|
||||
: (mask & ~info->compatmask2) | (info->compatflags2 & info->compatmask2);
|
||||
}
|
||||
|
||||
void FLevelLocals::ApplyCompatibility()
|
||||
{
|
||||
int old = i_compatflags;
|
||||
i_compatflags = GetCompatibility(compatflags) | ii_compatflags;
|
||||
if ((old ^ i_compatflags) & COMPATF_POLYOBJ)
|
||||
{
|
||||
ClearAllSubsectorLinks();
|
||||
}
|
||||
}
|
||||
|
||||
void FLevelLocals::ApplyCompatibility2()
|
||||
{
|
||||
i_compatflags2 = GetCompatibility2(compatflags2) | ii_compatflags2;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue