From db21313c96c28d1cff5cec3164624ca717168279 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 29 May 2021 13:12:50 +0200 Subject: [PATCH] - add some hackery to deal with WT's bosses. This was the result of some gross change to the spawning code which suddenly changed the rules about minibosses. To reduce the impact, it is only enabled for the "Alien World Order" maps. --- source/core/g_mapinfo.cpp | 1 + source/core/mapinfo.h | 2 + source/games/duke/src/flags_d.cpp | 3 +- source/games/duke/src/spawn_d.cpp | 4 +- wadsrc/static/filter/duke/engine/rmapinfo.txt | 40 +++++++++++++++++++ 5 files changed, 47 insertions(+), 3 deletions(-) diff --git a/source/core/g_mapinfo.cpp b/source/core/g_mapinfo.cpp index 1f1712454..fd4f01d30 100644 --- a/source/core/g_mapinfo.cpp +++ b/source/core/g_mapinfo.cpp @@ -634,6 +634,7 @@ MapFlagHandlers[] = { "clearinventory", MITYPE_SETFLAG, LEVEL_CLEARINVENTORY, 0, -1 }, { "clearweapons", MITYPE_SETFLAG, LEVEL_CLEARWEAPONS, 0, -1 }, { "forcenoeog", MITYPE_SETFLAG, LEVEL_FORCENOEOG, 0, -1 }, + { "wt_bossspawn", MITYPE_SETFLAG, LEVEL_WT_BOSSSPAWN, 0, -1 }, { "rrra_hulkspawn", MITYPE_SETFLAGG,LEVEL_RR_HULKSPAWN, 0, GAMEFLAG_RRRA }, { "rr_clearmoonshine", MITYPE_SETFLAGG,LEVEL_RR_CLEARMOONSHINE, 0, GAMEFLAG_RR }, { "ex_training", MITYPE_SETFLAGG,LEVEL_EX_TRAINING, 0, GAMEFLAG_PSEXHUMED }, diff --git a/source/core/mapinfo.h b/source/core/mapinfo.h index 5b2f6b006..4909670c2 100644 --- a/source/core/mapinfo.h +++ b/source/core/mapinfo.h @@ -52,6 +52,8 @@ enum EMapGameFlags LEVEL_SW_DEATHEXIT_SUMO = 2048, LEVEL_SW_DEATHEXIT_ZILLA = 4096, + LEVEL_WT_BOSSSPAWN = 8192, + }; diff --git a/source/games/duke/src/flags_d.cpp b/source/games/duke/src/flags_d.cpp index 4a7029751..84d11589a 100644 --- a/source/games/duke/src/flags_d.cpp +++ b/source/games/duke/src/flags_d.cpp @@ -89,7 +89,8 @@ void initactorflags_d() // Some flags taken from RedNukem's init code. This is a good start as any to reduce the insane dependency on tile numbers for making decisions in the play code. A lot more will be added here later. setflag(SFLAG_NODAMAGEPUSH, { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN }); - setflag(SFLAG_BOSS, { BOSS1, BOSS2, BOSS3, BOSS4 }); + setflag(SFLAG_BOSS, { BOSS1, BOSS2, BOSS3, BOSS4, BOSS4STAYPUT, BOSS1STAYPUT }); + if (isWorldTour()) setflag(SFLAG_BOSS, { BOSS2STAYPUT, BOSS3STAYPUT, BOSS5, BOSS5STAYPUT }); setflag(SFLAG_NOWATERDIP, { OCTABRAIN, COMMANDER, DRONE }); setflag(SFLAG_GREENSLIMEFOOD, { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST }); diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index 7b06e1ab0..13048c6f2 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -818,11 +818,11 @@ int spawn_d(int j, int pn) } } - if( sp->picnum == BOSS4STAYPUT || sp->picnum == BOSS1 || sp->picnum == BOSS2 || sp->picnum == BOSS1STAYPUT || sp->picnum == BOSS3 || sp->picnum == BOSS4 ) + if (bossguy(sp)) { if(j >= 0 && spj->picnum == RESPAWN) sp->pal = spj->pal; - if(sp->pal) + if (sp->pal && (!isWorldTour() || !(currentLevel->flags & LEVEL_WT_BOSSSPAWN) || sp->pal != 22)) { sp->clipdist = 80; sp->xrepeat = 40; diff --git a/wadsrc/static/filter/duke/engine/rmapinfo.txt b/wadsrc/static/filter/duke/engine/rmapinfo.txt index f2259245b..2acbbfe07 100644 --- a/wadsrc/static/filter/duke/engine/rmapinfo.txt +++ b/wadsrc/static/filter/duke/engine/rmapinfo.txt @@ -49,6 +49,46 @@ map { 4, 1 } } } +map { 5, 1 } +{ + wt_bossspawn +} + +map { 5, 2 } +{ + wt_bossspawn +} + +map { 5, 3 } +{ + wt_bossspawn +} + +map { 5, 4 } +{ + wt_bossspawn +} + +map { 5, 5 } +{ + wt_bossspawn +} + +map { 5, 6 } +{ + wt_bossspawn +} + +map { 5, 7 } +{ + wt_bossspawn +} + +map { 5, 8 } +{ + wt_bossspawn +} + cutscenes { intro