- give the hardware renderer's drawinfo its own level pointer

This commit is contained in:
Christoph Oelckers 2019-01-25 01:26:16 +01:00
commit ba114f6f23
33 changed files with 172 additions and 157 deletions

View file

@ -643,3 +643,32 @@ CCMD(listmapsections)
}
}
//==========================================================================
//
//
//
//==========================================================================
CUSTOM_CVAR(Bool, forcewater, false, CVAR_ARCHIVE | CVAR_SERVERINFO)
{
if (gamestate == GS_LEVEL)
{
auto Level = &level;
for (auto &sec : Level->sectors)
{
sector_t *hsec = sec.GetHeightSec();
if (hsec && !(hsec->MoreFlags & SECMF_UNDERWATER))
{
if (self)
{
hsec->MoreFlags |= SECMF_FORCEDUNDERWATER;
}
else
{
hsec->MoreFlags &= ~SECMF_FORCEDUNDERWATER;
}
}
}
}
}