foxygit / doom Log in
commit 6ec196ca814344336c1f8868fe21e8ff9f25f58e
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Wed Jun 11 00:14:07 2008 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Wed Jun 11 00:14:07 2008 +0000

    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
---
 src/deh_misc.c | 5 ++---
 src/p_inter.c  | 4 +++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/deh_misc.c b/src/deh_misc.c
index 11a7bc48..c8107858 100644
--- a/src/deh_misc.c
+++ b/src/deh_misc.c
@@ -62,9 +62,8 @@ int deh_max_armor = DEH_DEFAULT_MAX_ARMOR;
 // 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;

diff --git a/src/p_inter.c b/src/p_inter.c
index 64b9bc81..ee91bcd6 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -392,8 +392,10 @@ P_TouchSpecialThing
 	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;