Added pistol start gameplay option

Automatically resets the player's inventory and health when changing maps.
This commit is contained in:
Boondorl 2024-04-18 14:54:43 -04:00 committed by Rachael Alexanderson
commit f4a42dae1d
4 changed files with 6 additions and 2 deletions

View file

@ -776,11 +776,12 @@ void FLevelLocals::ChangeLevel(const char *levelname, int position, int inflags,
{
if (thiscluster != nextcluster || (thiscluster && !(thiscluster->flags & CLUSTER_HUB)))
{
if (nextinfo->flags2 & LEVEL2_RESETINVENTORY)
const bool doReset = dmflags3 & DF3_PISTOL_START;
if (doReset || (nextinfo->flags2 & LEVEL2_RESETINVENTORY))
{
inflags |= CHANGELEVEL_RESETINVENTORY;
}
if (nextinfo->flags2 & LEVEL2_RESETHEALTH)
if (doReset || (nextinfo->flags2 & LEVEL2_RESETHEALTH))
{
inflags |= CHANGELEVEL_RESETHEALTH;
}