summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2011-10-22 18:24:08 +0000
committerSimon Howard2011-10-22 18:24:08 +0000
commit71d316afb2ae7191a4ef6fac2d757238ae3616e1 (patch)
treed4138d531e177856167f88450121259dcb9756c0 /src
parent8f980fe24cb3144bf7bcb6dbcb4f29ef554fbaa3 (diff)
downloadchocolate-doom-71d316afb2ae7191a4ef6fac2d757238ae3616e1.tar.gz
chocolate-doom-71d316afb2ae7191a4ef6fac2d757238ae3616e1.tar.bz2
chocolate-doom-71d316afb2ae7191a4ef6fac2d757238ae3616e1.zip
Fix teleport behavior when emulating the alternate Final Doom
executable. Change the default Final Doom emulation mode to be the original executable. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2457
Diffstat (limited to 'src')
-rw-r--r--src/d_main.c8
-rw-r--r--src/p_telept.c17
2 files changed, 13 insertions, 12 deletions
diff --git a/src/d_main.c b/src/d_main.c
index 613db3c1..1c757088 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -735,10 +735,12 @@ static void InitGameVersion(void)
else
{
// Final Doom: tnt or plutonia
- // Default to the "alt" version of the executable that
- // fixes the demo loop behavior.
+ // Defaults to emulating the first Final Doom executable,
+ // which has the crash in the demo loop; however, having
+ // this as the default should mean that it plays back
+ // most demos correctly.
- gameversion = exe_final2;
+ gameversion = exe_final;
}
}
}
diff --git a/src/p_telept.c b/src/p_telept.c
index abd307c5..73c3e9b5 100644
--- a/src/p_telept.c
+++ b/src/p_telept.c
@@ -104,19 +104,18 @@ EV_Teleport
if (!P_TeleportMove (thing, m->x, m->y))
return 0;
-
- // fraggle: this was changed in final doom,
- // problem between normal doom2 1.9 and final doom
- //
- // Note that although chex.exe is based on Final Doom,
- // it does not have this quirk.
- if (gameversion < exe_final || gameversion == exe_chex)
+ // The first Final Doom executable does not set thing->z
+ // when teleporting. This quirk is unique to this
+ // particular version; the later version included in
+ // some versions of the Id Anthology fixed this.
+
+ if (gameversion != exe_final)
thing->z = thing->floorz;
-
+
if (thing->player)
thing->player->viewz = thing->z+thing->player->viewheight;
-
+
// spawn teleport fog at source and destination
fog = P_SpawnMobj (oldx, oldy, oldz, MT_TFOG);
S_StartSound (fog, sfx_telept);