summaryrefslogtreecommitdiff
path: root/src/p_mobj.c
diff options
context:
space:
mode:
authorSimon Howard2005-07-23 17:46:19 +0000
committerSimon Howard2005-07-23 17:46:19 +0000
commit02c50cf81858d900e8f30299eb24d9aa04eb3f71 (patch)
tree07fcec65689bacd25642383be637a06b165f8cce /src/p_mobj.c
parentec8ab9e6a3fbcdc57a42cc7bd61b944f589da597 (diff)
downloadchocolate-doom-02c50cf81858d900e8f30299eb24d9aa04eb3f71.tar.gz
chocolate-doom-02c50cf81858d900e8f30299eb24d9aa04eb3f71.tar.bz2
chocolate-doom-02c50cf81858d900e8f30299eb24d9aa04eb3f71.zip
Import bouncing lost soul fix from prboom
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 14
Diffstat (limited to 'src/p_mobj.c')
-rw-r--r--src/p_mobj.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/p_mobj.c b/src/p_mobj.c
index a9e5107b..9d75d909 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: p_mobj.c 8 2005-07-23 16:44:57Z fraggle $
+// $Id: p_mobj.c 14 2005-07-23 17:46:19Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.3 2005/07/23 17:46:19 fraggle
+// Import bouncing lost soul fix from prboom
+//
// Revision 1.2 2005/07/23 16:44:56 fraggle
// Update copyright to GNU GPL
//
@@ -35,7 +38,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: p_mobj.c 8 2005-07-23 16:44:57Z fraggle $";
+rcsid[] = "$Id: p_mobj.c 14 2005-07-23 17:46:19Z fraggle $";
#include "i_system.h"
#include "z_zone.h"
@@ -301,7 +304,19 @@ void P_ZMovement (mobj_t* mo)
// Note (id):
// somebody left this after the setting momz to 0,
// kinda useless there.
- if (mo->flags & MF_SKULLFLY)
+ //
+ // cph - This was the a bug in the linuxdoom-1.10 source which
+ // caused it not to sync Doom 2 v1.9 demos. Someone
+ // added the above comment and moved up the following code. So
+ // demos would desync in close lost soul fights.
+ // Note that this only applies to original Doom 1 or Doom2 demos - not
+ // Final Doom and Ultimate Doom. So we test demo_compatibility *and*
+ // gamemission. (Note we assume that Doom1 is always Ult Doom, which
+ // seems to hold for most published demos.)
+
+ int correct_lost_soul_bounce = gamemission != doom2;
+
+ if (correct_lost_soul_bounce && mo->flags & MF_SKULLFLY)
{
// the skull slammed into something
mo->momz = -mo->momz;
@@ -323,6 +338,16 @@ void P_ZMovement (mobj_t* mo)
}
mo->z = mo->floorz;
+
+ // cph 2001/05/26 -
+ // See lost soul bouncing comment above. We need this here for bug
+ // compatibility with original Doom2 v1.9 - if a soul is charging and
+ // hit by a raising floor this incorrectly reverses its Y momentum.
+ //
+
+ if (!correct_lost_soul_bounce && mo->flags & MF_SKULLFLY)
+ mo->momz = -mo->momz;
+
if ( (mo->flags & MF_MISSILE)
&& !(mo->flags & MF_NOCLIP) )
{