From d77de209a1df1e2fe2126bedb740d4b375a7c754 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Fri, 13 Dec 2024 12:14:44 +0700 Subject: [PATCH] fix `bossactions = clear` --- src/p_enemy.c | 3 +++ src/u_mapinfo.c | 2 +- src/u_mapinfo.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 53efa04e4..4cce3840c 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -2285,6 +2285,9 @@ void A_BossDeath(mobj_t *mo) line_t junk; int i; + if (gamemapinfo && gamemapinfo->nobossactions) + return; + if (gamemapinfo && array_size(gamemapinfo->bossactions)) { // make sure there is a player alive for victory diff --git a/src/u_mapinfo.c b/src/u_mapinfo.c index 3bb6807d7..150b5ae4d 100644 --- a/src/u_mapinfo.c +++ b/src/u_mapinfo.c @@ -566,8 +566,8 @@ static void ParseStandardProperty(scanner_t *s, mapentry_t *mape) SC_MustGetToken(s, TK_Identifier); if (!strcasecmp(SC_GetString(s), "clear")) { - // mark level free of boss actions array_free(mape->bossactions); + mape->nobossactions = true; // mark level free of boss actions } else { diff --git a/src/u_mapinfo.h b/src/u_mapinfo.h index f72b65938..69eac11c5 100644 --- a/src/u_mapinfo.h +++ b/src/u_mapinfo.h @@ -53,6 +53,7 @@ typedef struct mapentry_s int partime; boolean nointermission; bossaction_t *bossactions; + boolean nobossactions; } mapentry_t; extern mapentry_t *umapinfo, *umapdef;