summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/games/doom/d_main.c7
-rw-r--r--sys/src/games/doom/p_local.h2
-rw-r--r--sys/src/games/doom/p_mobj.c8
-rw-r--r--sys/src/games/doom/p_telept.c5
4 files changed, 16 insertions, 6 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"))
diff --git a/sys/src/games/doom/p_local.h b/sys/src/games/doom/p_local.h
index 3fa0c721b..2ff19ec89 100644
--- a/sys/src/games/doom/p_local.h
+++ b/sys/src/games/doom/p_local.h
@@ -60,6 +60,8 @@
// follow a player exlusively for 3 seconds
#define BASETHRESHOLD 100
+extern boolean noztele;
+extern boolean nobounce;
//
diff --git a/sys/src/games/doom/p_mobj.c b/sys/src/games/doom/p_mobj.c
index 07eb37a35..9c157baca 100644
--- a/sys/src/games/doom/p_mobj.c
+++ b/sys/src/games/doom/p_mobj.c
@@ -285,10 +285,7 @@ void P_ZMovement (mobj_t* mo)
{
// hit the floor
- // Note (id):
- // somebody left this after the setting momz to 0,
- // kinda useless there.
- if (mo->flags & MF_SKULLFLY)
+ if (!nobounce && mo->flags & MF_SKULLFLY)
{
// the skull slammed into something
mo->momz = -mo->momz;
@@ -310,6 +307,9 @@ void P_ZMovement (mobj_t* mo)
}
mo->z = mo->floorz;
+ if (nobounce && mo->flags & MF_SKULLFLY)
+ mo->momz = -mo->momz;
+
if ( (mo->flags & MF_MISSILE)
&& !(mo->flags & MF_NOCLIP) )
{
diff --git a/sys/src/games/doom/p_telept.c b/sys/src/games/doom/p_telept.c
index 378dff2bb..73ae11961 100644
--- a/sys/src/games/doom/p_telept.c
+++ b/sys/src/games/doom/p_telept.c
@@ -101,8 +101,9 @@ EV_Teleport
if (!P_TeleportMove (thing, m->x, m->y))
return 0;
-
- thing->z = thing->floorz; //fixme: not needed?
+
+ if(!noztele)
+ thing->z = thing->floorz;
if (thing->player)
thing->player->viewz = thing->z+thing->player->viewheight;