ref: 29571c16efee0d4d4a864a9ea222f5c3c2add4c3
parent: b9a5732a74152bf8ee21e86fc23fe43d3b235f4c
author: Simon Howard <[email protected]>
date: Thu Oct 13 18:23:55 EDT 2005
Fix logic for lost soul bounce Subversion-branch: /trunk/chocolate-doom Subversion-revision: 191
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: p_mobj.c 14 2005-07-23 17:46:19Z fraggle $
+// $Id: p_mobj.c 191 2005-10-13 22:23:55Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.4 2005/10/13 22:23:55 fraggle
+// Fix logic for lost soul bounce
+//
// Revision 1.3 2005/07/23 17:46:19 fraggle
// Import bouncing lost soul fix from prboom
//
@@ -38,7 +41,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: p_mobj.c 14 2005-07-23 17:46:19Z fraggle $";
+rcsid[] = "$Id: p_mobj.c 191 2005-10-13 22:23:55Z fraggle $";
#include "i_system.h"
#include "z_zone.h"
@@ -313,8 +316,20 @@
// 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.)
+ //
+ // fraggle - cph got the logic here slightly wrong. There are three
+ // versions of Doom 1.9:
+ //
+ // * The version used in registered doom 1.9 + doom2 - no bounce
+ // * The version used in ultimate doom - has bounce
+ // * The version used in final doom - has bounce
+ //
+ // So we need to check that this is either retail or commercial
+ // (but not doom2)
- int correct_lost_soul_bounce = gamemission != doom2;
+ int correct_lost_soul_bounce
+ = (gamemode == retail || gamemode == commercial)
+ && gamemission != doom2;
if (correct_lost_soul_bounce && mo->flags & MF_SKULLFLY)
{