- fix the compat_pointonline flag.
This commit is contained in:
parent
7606b22d0b
commit
5da2ecda66
4 changed files with 38 additions and 23 deletions
|
|
@ -534,28 +534,11 @@ CVAR (Flag, sv_respawnsuper, dmflags2, DF2_RESPAWN_SUPER);
|
|||
|
||||
EXTERN_CVAR(Int, compatmode)
|
||||
|
||||
static int GetCompatibility(FLevelLocals *Level, int mask)
|
||||
{
|
||||
if (Level->info == nullptr) return mask;
|
||||
else return (mask & ~Level->info->compatmask) | (Level->info->compatflags & Level->info->compatmask);
|
||||
}
|
||||
|
||||
static int GetCompatibility2(FLevelLocals *Level, int mask)
|
||||
{
|
||||
return (Level->info == nullptr) ? mask
|
||||
: (mask & ~Level->info->compatmask2) | (Level->info->compatflags2 & Level->info->compatmask2);
|
||||
}
|
||||
|
||||
CUSTOM_CVAR (Int, compatflags, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCALL)
|
||||
{
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
int old = Level->i_compatflags;
|
||||
Level->i_compatflags = GetCompatibility(Level, self) | Level->ii_compatflags;
|
||||
if ((old ^ Level->i_compatflags) & COMPATF_POLYOBJ)
|
||||
{
|
||||
Level->ClearAllSubsectorLinks();
|
||||
}
|
||||
Level->ApplyCompatibility();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -563,7 +546,7 @@ CUSTOM_CVAR (Int, compatflags2, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCAL
|
|||
{
|
||||
for (auto Level : AllLevels())
|
||||
{
|
||||
Level->i_compatflags2 = GetCompatibility2(Level, self) | Level->ii_compatflags2;
|
||||
Level->ApplyCompatibility2();
|
||||
Level->SetCompatLineOnSide(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue