ref: 02c50cf81858d900e8f30299eb24d9aa04eb3f71
parent: ec8ab9e6a3fbcdc57a42cc7bd61b944f589da597
author: Simon Howard <[email protected]>
date: Sat Jul 23 13:46:19 EDT 2005
Import bouncing lost soul fix from prboom Subversion-branch: /trunk/chocolate-doom Subversion-revision: 14
--- 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 @@
// 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;
@@ -322,6 +337,16 @@
mo->momz = 0;
}
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) )