shithub: choc

Download patch

ref: 6ec196ca814344336c1f8868fe21e8ff9f25f58e
parent: e04445dd0766dc77b818c76c85b44c2aadbf71ac
author: Simon Howard <fraggle@gmail.com>
date: Tue Jun 10 20:14:07 EDT 2008

Only apply dehacked green armor class to the green armor shirt, not the
armor helmets as well.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1146

--- a/src/deh_misc.c
+++ b/src/deh_misc.c
@@ -62,9 +62,8 @@
 // This is the armor class that is given when picking up the green 
 // armor or an armor helmet. See P_TouchSpecialThing in p_inter.c
 //
-// Question: Does DOS dehacked modify the armor helmet behavior 
-// as well as the green armor behavior?  I am currently following
-// the Boom behavior, which is "yes".
+// DOS dehacked only modifies the behavior of the green armor shirt,
+// the armor class set by armor helmets is not affected.
 
 int deh_green_armor_class = DEH_DEFAULT_GREEN_ARMOR_CLASS;
 
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -392,8 +392,10 @@
 	player->armorpoints++;		// can go over 100%
 	if (player->armorpoints > deh_max_armor)
 	    player->armorpoints = deh_max_armor;
+        // deh_green_armor_class only applies to the green armor shirt;
+        // for the armor helmets, armortype 1 is always used.
 	if (!player->armortype)
-	    player->armortype = deh_green_armor_class;
+	    player->armortype = 1;
 	player->message = DEH_String(GOTARMBONUS);
 	break;