summaryrefslogtreecommitdiff
path: root/sys/src/games/doom/d_main.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-07-30 19:55:13 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-07-30 19:55:13 +0200
commitb579acef97171a057fb8f4c6fd2493690b5cf3c7 (patch)
tree304565fe0423f416ce764868162e362c18a1dafc /sys/src/games/doom/d_main.c
parentf899b2fe3c091ccab33673f9fea9d1d99c0c2940 (diff)
games/doom: add bug compatibility switches (thanks qu7uux)
these emulate bugs present in select versions of the released doom executables. they are required to correctly play demos recorded with these but affect the gameplay, so should be otherwise disabled. -nobounce: lost souls don't bounce off floors and ceilings like intended due to a misplaced check; this is fixed from ultimate doom on, but doom and doom2 are still affected. -noztele: in final doom 1.9, things' altitude was erroneously not set to the floor's height after teleporting. this was fixed in later versions of the executables. examples of desyncing demos: (plutonia.wad, without -noztele) http://doomedsda.us/lmps/946/2/30pl2646.zip (doom2.wad, without -nobounce) http://doomedsda.us/lmps/945/3/30nm2939.zip
Diffstat (limited to 'sys/src/games/doom/d_main.c')
-rw-r--r--sys/src/games/doom/d_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/src/games/doom/d_main.c b/sys/src/games/doom/d_main.c
index f693bebff..369d67650 100644
--- a/sys/src/games/doom/d_main.c
+++ b/sys/src/games/doom/d_main.c
@@ -90,6 +90,9 @@ boolean drone;
boolean singletics = false; // debug flag to cancel adaptiveness
+/* bug compatibility with various versions of doom */
+boolean noztele;
+boolean nobounce;
//extern int soundVolume;
@@ -736,6 +739,10 @@ void D_DoomMain (void)
respawnparm = M_CheckParm ("-respawn");
fastparm = M_CheckParm ("-fast");
devparm = M_CheckParm ("-devparm");
+ if (M_CheckParm ("-noztele") && gamemode == commercial)
+ noztele = 1;
+ if (M_CheckParm ("-nobounce") && (gamemode == commercial || gamemode == registered))
+ nobounce = 1;
if (M_CheckParm ("-altdeath"))
deathmatch = 2;
else if (M_CheckParm ("-deathmatch"))