From 7e6ff37fdbeb36f4c37e0d47ff8ab9fa25121d46 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Sat, 18 Jan 2020 15:29:47 +0100 Subject: [PATCH] add game version specific differences This implements the subtle differences found in the three variants of DOOM.EXE version 1.9. The code was taken from PrBoom+ and Chocolate Doom, respectively. I decided to go without the original comments, the code has been commented well enough in other source ports. @fragglet Do you think these are all the relevant differences? --- Source/p_enemy.c | 10 ++++++++++ Source/p_mobj.c | 13 ++++++++++++- Source/p_telept.c | 4 ++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Source/p_enemy.c b/Source/p_enemy.c index 551a8421..b5209a7d 100644 --- a/Source/p_enemy.c +++ b/Source/p_enemy.c @@ -2133,6 +2133,16 @@ void A_BossDeath(mobj_t *mo) } else { + // [FG] game version specific differences + if (demo_compatibility && gameversion < exe_ultimate) + { + if (gamemap != 8) + return; + + if (mo->type == MT_BRUISER && gameepisode != 1) + return; + } + else switch(gameepisode) { case 1: diff --git a/Source/p_mobj.c b/Source/p_mobj.c index dac22b40..30ea3aa3 100644 --- a/Source/p_mobj.c +++ b/Source/p_mobj.c @@ -469,8 +469,13 @@ floater: { // hit the floor - if (mo->flags & MF_SKULLFLY) + // [FG] game version specific differences + int correct_lost_soul_bounce = !demo_compatibility || gameversion >= exe_ultimate; + + if (correct_lost_soul_bounce && mo->flags & MF_SKULLFLY) + { mo->momz = -mo->momz; // the skull slammed into something + } if (mo->momz < 0) { @@ -496,6 +501,12 @@ floater: mo->z = mo->floorz; + // [FG] game version specific differences + if (!correct_lost_soul_bounce && mo->flags & MF_SKULLFLY) + { + mo->momz = -mo->momz; + } + if (!((mo->flags ^ MF_MISSILE) & (MF_MISSILE | MF_NOCLIP))) { P_ExplodeMissile (mo); diff --git a/Source/p_telept.c b/Source/p_telept.c index 9a00ec2e..2303d1b6 100644 --- a/Source/p_telept.c +++ b/Source/p_telept.c @@ -72,7 +72,11 @@ int EV_Teleport(line_t *line, int side, mobj_t *thing) if (!P_TeleportMove(thing, m->x, m->y, false)) // killough 8/9/98 return 0; + // [FG] game version specific differences + if (demo_compatibility && gameversion != exe_final) + { thing->z = thing->floorz; + } if (player) player->viewz = thing->z + player->viewheight;