diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index aa8eb93d1..bc1341d1f 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -3087,8 +3087,20 @@ void A_BossDeath(AActor *self) } checked = true; - P_ExecuteSpecial(sa->Action, NULL, self, false, - sa->Args[0], sa->Args[1], sa->Args[2], sa->Args[3], sa->Args[4]); + if (sa->Action & 0x40000000) + { + // This is a Doom format special from UMAPINFO. It must be translated here, because at parsing time there is not sufficient context to do it. + maplinedef_t ml; + ml.special = sa->Action & 0x3fffffff; + ml.tag = sa->Args[0]; + line_t line; + self->Level->TranslateLineDef(&line, &ml); + P_ExecuteSpecial(line.special, NULL, self, false, line.args[0], line.args[1], line.args[2], line.args[3], line.args[4]); + } + else + { + P_ExecuteSpecial(sa->Action, NULL, self, false, sa->Args[0], sa->Args[1], sa->Args[2], sa->Args[3], sa->Args[4]); + } } } diff --git a/src/umapinfo.cpp b/src/umapinfo.cpp index eccace0d6..c981fc44f 100644 --- a/src/umapinfo.cpp +++ b/src/umapinfo.cpp @@ -274,14 +274,10 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape) #pragma message("Fixme: This needs to be evaluated at run time") if (tag != 0 || special == 11 || special == 51 || special == 52 || special == 124) { + // This cannot be evaluated here because this needs to be done in the context of the level being used. FSpecialAction & bossact = mape->BossActions[mape->BossActions.Reserve(1)]; - line_t line; - maplinedef_t mld; - mld.special = special; - mld.tag = tag; - //level.TranslateLineDef(&line, &mld); - bossact = { type, (uint8_t)line.special, {line.args[0], line.args[1],line.args[2],line.args[3],line.args[4]} }; - } + bossact = { type, special | 0x40000000, tag }; + }; } } else