mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-21 19:51:27 +00:00
fix UMAPINFO boss action clearing.
This did not handle the case where the actions were cleared without adding new ones and also did not clear the MBF21 boss action flags.
This commit is contained in:
parent
71d4eb66f2
commit
602c7c4e24
1 changed files with 4 additions and 1 deletions
|
@ -42,6 +42,7 @@ struct UMapEntry
|
||||||
FString InterText;
|
FString InterText;
|
||||||
FString InterTextSecret;
|
FString InterTextSecret;
|
||||||
TArray<FSpecialAction> BossActions;
|
TArray<FSpecialAction> BossActions;
|
||||||
|
bool BossCleared = false;
|
||||||
|
|
||||||
char levelpic[9] = "";
|
char levelpic[9] = "";
|
||||||
char nextmap[9] = "";
|
char nextmap[9] = "";
|
||||||
|
@ -268,6 +269,7 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape)
|
||||||
// mark level free of boss actions
|
// mark level free of boss actions
|
||||||
classnum = special = tag = -1;
|
classnum = special = tag = -1;
|
||||||
mape->BossActions.Clear();
|
mape->BossActions.Clear();
|
||||||
|
mape->BossCleared = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -446,11 +448,12 @@ void CommitUMapinfo(level_info_t *defaultinfo)
|
||||||
levelinfo->InterMusic = map.intermusic;
|
levelinfo->InterMusic = map.intermusic;
|
||||||
levelinfo->intermusicorder = 0;
|
levelinfo->intermusicorder = 0;
|
||||||
}
|
}
|
||||||
if (map.BossActions.Size() > 0)
|
if (map.BossActions.Size() > 0 || map.BossCleared)
|
||||||
{
|
{
|
||||||
// Setting a boss action will deactivate the flag based monster actions.
|
// Setting a boss action will deactivate the flag based monster actions.
|
||||||
levelinfo->specialactions = std::move(map.BossActions);
|
levelinfo->specialactions = std::move(map.BossActions);
|
||||||
levelinfo->flags &= ~(LEVEL_BRUISERSPECIAL | LEVEL_CYBORGSPECIAL | LEVEL_SPIDERSPECIAL | LEVEL_MAP07SPECIAL | LEVEL_MINOTAURSPECIAL | LEVEL_HEADSPECIAL | LEVEL_SORCERER2SPECIAL | LEVEL_SPECACTIONSMASK | LEVEL_SPECKILLMONSTERS);
|
levelinfo->flags &= ~(LEVEL_BRUISERSPECIAL | LEVEL_CYBORGSPECIAL | LEVEL_SPIDERSPECIAL | LEVEL_MAP07SPECIAL | LEVEL_MINOTAURSPECIAL | LEVEL_HEADSPECIAL | LEVEL_SORCERER2SPECIAL | LEVEL_SPECACTIONSMASK | LEVEL_SPECKILLMONSTERS);
|
||||||
|
levelinfo->flags3 &= ~(LEVEL3_E1M8SPECIAL | LEVEL3_E2M8SPECIAL | LEVEL3_E3M8SPECIAL | LEVEL3_E4M8SPECIAL | LEVEL3_E4M6SPECIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int exflags = FExitText::DEF_TEXT | FExitText::DEF_BACKDROP | FExitText::DEF_MUSIC;
|
const int exflags = FExitText::DEF_TEXT | FExitText::DEF_BACKDROP | FExitText::DEF_MUSIC;
|
||||||
|
|
Loading…
Reference in a new issue