summaryrefslogtreecommitdiff
path: root/src/p_inter.c
diff options
context:
space:
mode:
authorSimon Howard2005-10-17 20:49:42 +0000
committerSimon Howard2005-10-17 20:49:42 +0000
commitae8ca20a1d02dade7bc0d8feb09225d91e53f3be (patch)
tree74b5a37dde1a0f1c8e0c2adae155b682f86c14a6 /src/p_inter.c
parent4dc1ca199d444314dfeada9bf159a538edc50414 (diff)
downloadchocolate-doom-ae8ca20a1d02dade7bc0d8feb09225d91e53f3be.tar.gz
chocolate-doom-ae8ca20a1d02dade7bc0d8feb09225d91e53f3be.tar.bz2
chocolate-doom-ae8ca20a1d02dade7bc0d8feb09225d91e53f3be.zip
Add dehacked "Misc" implementations for max armor+health, blue+green
armor classes Subversion-branch: /trunk/chocolate-doom Subversion-revision: 207
Diffstat (limited to 'src/p_inter.c')
-rw-r--r--src/p_inter.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/p_inter.c b/src/p_inter.c
index f581f0e0..7a88ede2 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: p_inter.c 160 2005-10-03 21:39:39Z fraggle $
+// $Id: p_inter.c 207 2005-10-17 20:49:42Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,10 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.5 2005/10/17 20:49:42 fraggle
+// Add dehacked "Misc" implementations for max armor+health, blue+green
+// armor classes
+//
// Revision 1.4 2005/10/03 21:39:39 fraggle
// Dehacked text substitutions
//
@@ -42,7 +46,7 @@
static const char
-rcsid[] = "$Id: p_inter.c 160 2005-10-03 21:39:39Z fraggle $";
+rcsid[] = "$Id: p_inter.c 207 2005-10-17 20:49:42Z fraggle $";
// Data.
@@ -51,6 +55,7 @@ rcsid[] = "$Id: p_inter.c 160 2005-10-03 21:39:39Z fraggle $";
#include "sounds.h"
#include "deh_main.h"
+#include "deh_misc.h"
#include "doomstat.h"
#include "m_random.h"
@@ -247,12 +252,12 @@ P_GiveBody
( player_t* player,
int num )
{
- if (player->health >= MAXHEALTH)
+ if (player->health >= deh_max_health)
return false;
player->health += num;
- if (player->health > MAXHEALTH)
- player->health = MAXHEALTH;
+ if (player->health > deh_max_health)
+ player->health = deh_max_health;
player->mo->health = player->health;
return true;
@@ -385,13 +390,13 @@ P_TouchSpecialThing
{
// armor
case SPR_ARM1:
- if (!P_GiveArmor (player, 1))
+ if (!P_GiveArmor (player, deh_green_armor_class))
return;
player->message = DEH_String(GOTARMOR);
break;
case SPR_ARM2:
- if (!P_GiveArmor (player, 2))
+ if (!P_GiveArmor (player, deh_blue_armor_class))
return;
player->message = DEH_String(GOTMEGA);
break;
@@ -407,10 +412,10 @@ P_TouchSpecialThing
case SPR_BON2:
player->armorpoints++; // can go over 100%
- if (player->armorpoints > 200)
- player->armorpoints = 200;
+ if (player->armorpoints > deh_max_armor)
+ player->armorpoints = deh_max_armor;
if (!player->armortype)
- player->armortype = 1;
+ player->armortype = deh_green_armor_class;
player->message = DEH_String(GOTARMBONUS);
break;
@@ -428,7 +433,7 @@ P_TouchSpecialThing
return;
player->health = 200;
player->mo->health = player->health;
- P_GiveArmor (player,2);
+ P_GiveArmor (player, deh_blue_armor_class);
player->message = DEH_String(GOTMSPHERE);
sound = sfx_getpow;
break;