[chocolate-doom] 54/79: Interpret the dehacked "max health" setting properly.

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.

commit b3c40063829b83b0b87912973e123ea0f6e05390
Author: Simon Howard <fraggle at gmail.com>
Date:   Thu Jan 12 00:21:29 2006 +0000

    Interpret the dehacked "max health" setting properly.
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 282
---
 NEWS           | 10 ++++++----
 src/deh_misc.c |  9 ++++++---
 src/p_inter.c  | 17 ++++++++++-------
 3 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/NEWS b/NEWS
index 17a3f43..28a3998 100644
--- a/NEWS
+++ b/NEWS
@@ -1,15 +1,17 @@
 
+    Imported the spechit overrun emulation code from prboom-plus.  Thanks to
+         Andrey Budko for this.
+    New show_endoom option in the chocolate-doom.cfg config file allows
+         the ENDOOM screen to be disabled.
+
     Fixes for big endian machines (thanks locust)
+    Fixed the behavior of the dehacked maximum health setting.
     Fix the "-skill 0" hack to play without any items (thanks to Janizdreg
         for pointing out that this was nonfunctional)
     Fix playing of sounds at odd sample rates (again).  Sound effects at
         any sample rate now play, but only sounds with valid headers.
         This is the *real* way Vanilla Doom behaves.  Thanks to myk for
         pointing out the incorrect behavior.
-    Imported the spechit overrun emulation code from prboom-plus.  Thanks to
-         Andrey Budko for this.
-    New show_endoom option in the chocolate-doom.cfg config file allows
-         the ENDOOM screen to be disabled.
 
 0.1.2 (2005-10-29):
 
diff --git a/src/deh_misc.c b/src/deh_misc.c
index dcfe998..8329e87 100644
--- a/src/deh_misc.c
+++ b/src/deh_misc.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_misc.c 212 2005-10-17 22:07:26Z fraggle $
+// $Id: deh_misc.c 282 2006-01-12 00:21:29Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.9  2006/01/12 00:21:29  fraggle
+// Interpret the dehacked "max health" setting properly.
+//
 // Revision 1.8  2005/10/17 22:07:25  fraggle
 // Fix "Monsters Infight"
 //
@@ -80,9 +83,9 @@ int deh_initial_bullets = 50;
 
 // Dehacked: "Max Health"
 // This is the maximum health that can be reached using medikits 
-// alone.  See P_GiveBody in p_inter.c
+// alone.  See P_TouchSpecialThing in p_inter.c
 
-int deh_max_health = 100;
+int deh_max_health = 200;
 
 // Dehacked: "Max Armor"
 // This is the maximum armor which can be reached by picking up
diff --git a/src/p_inter.c b/src/p_inter.c
index 2081bd0..ae5dce6 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: p_inter.c 208 2005-10-17 21:02:57Z fraggle $
+// $Id: p_inter.c 282 2006-01-12 00:21:29Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.7  2006/01/12 00:21:29  fraggle
+// Interpret the dehacked "max health" setting properly.
+//
 // Revision 1.6  2005/10/17 21:02:57  fraggle
 // Dehacked Misc support: Max soulsphere, Soulsphere+Megasphere health bonus
 // values, God mode health value
@@ -50,7 +53,7 @@
 
 
 static const char
-rcsid[] = "$Id: p_inter.c 208 2005-10-17 21:02:57Z fraggle $";
+rcsid[] = "$Id: p_inter.c 282 2006-01-12 00:21:29Z fraggle $";
 
 
 // Data.
@@ -256,12 +259,12 @@ P_GiveBody
 ( player_t*	player,
   int		num )
 {
-    if (player->health >= deh_max_health)
+    if (player->health >= MAXHEALTH)
 	return false;
 		
     player->health += num;
-    if (player->health > deh_max_health)
-	player->health = deh_max_health;
+    if (player->health > MAXHEALTH)
+	player->health = MAXHEALTH;
     player->mo->health = player->health;
 	
     return true;
@@ -408,8 +411,8 @@ P_TouchSpecialThing
 	// bonus items
       case SPR_BON1:
 	player->health++;		// can go over 100%
-	if (player->health > 200)
-	    player->health = 200;
+	if (player->health > deh_max_health)
+	    player->health = deh_max_health;
 	player->mo->health = player->health;
 	player->message = DEH_String(GOTHTHBONUS);
 	break;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list