summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2005-10-17 21:02:57 +0000
committerSimon Howard2005-10-17 21:02:57 +0000
commit1d597be89e490a95eac3a135f97bdc07a05fa47e (patch)
treef7aeef125b5c195436f4a43be1d2d870c0a3acbf /src
parentae8ca20a1d02dade7bc0d8feb09225d91e53f3be (diff)
downloadchocolate-doom-1d597be89e490a95eac3a135f97bdc07a05fa47e.tar.gz
chocolate-doom-1d597be89e490a95eac3a135f97bdc07a05fa47e.tar.bz2
chocolate-doom-1d597be89e490a95eac3a135f97bdc07a05fa47e.zip
Dehacked Misc support: Max soulsphere, Soulsphere+Megasphere health bonus
values, God mode health value Subversion-branch: /trunk/chocolate-doom Subversion-revision: 208
Diffstat (limited to 'src')
-rw-r--r--src/deh_misc.c42
-rw-r--r--src/p_inter.c16
-rw-r--r--src/st_stuff.c11
3 files changed, 51 insertions, 18 deletions
diff --git a/src/deh_misc.c b/src/deh_misc.c
index 9af0fbac..6fa71382 100644
--- a/src/deh_misc.c
+++ b/src/deh_misc.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: deh_misc.c 207 2005-10-17 20:49:42Z fraggle $
+// $Id: deh_misc.c 208 2005-10-17 21:02:57Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -21,6 +21,10 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.5 2005/10/17 21:02:57 fraggle
+// Dehacked Misc support: Max soulsphere, Soulsphere+Megasphere health bonus
+// values, God mode health value
+//
// Revision 1.4 2005/10/17 20:49:42 fraggle
// Add dehacked "Misc" implementations for max armor+health, blue+green
// armor classes
@@ -95,10 +99,30 @@ int deh_green_armor_class = 1;
int deh_blue_armor_class = 2;
-int deh_max_soulsphere; // TODO
-int deh_soulsphere_health; // TODO
-int deh_megasphere_health; // TODO
-int deh_god_mode_health; // TODO
+// Dehacked: "Max soulsphere"
+// The maximum health which can be reached by picking up the
+// soulsphere. See P_TouchSpecialThing in p_inter.c
+
+int deh_max_soulsphere = 200;
+
+// Dehacked: "Soulsphere health"
+// The amount of health bonus that picking up a soulsphere
+// gives. See P_TouchSpecialThing in p_inter.c
+
+int deh_soulsphere_health = 100;
+
+// Dehacked: "Megasphere health"
+// This is what the health is set to after picking up a
+// megasphere. See P_TouchSpecialThing in p_inter.c
+
+int deh_megasphere_health = 200;
+
+// Dehacked: "God mode health"
+// This is what the health value is set to when cheating using
+// the IDDQD god mode cheat.
+
+int deh_god_mode_health = 100;
+
int deh_idfa_armor; // TODO
int deh_idfa_armor_class; // TODO
int deh_idkfa_armor; // TODO
@@ -124,10 +148,10 @@ static struct
{"Max Armor", &deh_max_armor, true},
{"Green Armor Class", &deh_green_armor_class, true},
{"Blue Armor Class", &deh_blue_armor_class, true},
- {"Max Soulsphere", &deh_max_soulsphere},
- {"Soulsphere Health", &deh_soulsphere_health},
- {"Megasphere Health", &deh_megasphere_health},
- {"God Mode Health", &deh_god_mode_health},
+ {"Max Soulsphere", &deh_max_soulsphere, true},
+ {"Soulsphere Health", &deh_soulsphere_health, true},
+ {"Megasphere Health", &deh_megasphere_health, true},
+ {"God Mode Health", &deh_god_mode_health, true},
{"IDFA Armor", &deh_idfa_armor},
{"IDFA Armor Class", &deh_idfa_armor_class},
{"IDKFA Armor", &deh_idkfa_armor},
diff --git a/src/p_inter.c b/src/p_inter.c
index 7a88ede2..2081bd08 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: p_inter.c 207 2005-10-17 20:49:42Z fraggle $
+// $Id: p_inter.c 208 2005-10-17 21:02:57Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,10 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.6 2005/10/17 21:02:57 fraggle
+// Dehacked Misc support: Max soulsphere, Soulsphere+Megasphere health bonus
+// values, God mode health value
+//
// Revision 1.5 2005/10/17 20:49:42 fraggle
// Add dehacked "Misc" implementations for max armor+health, blue+green
// armor classes
@@ -46,7 +50,7 @@
static const char
-rcsid[] = "$Id: p_inter.c 207 2005-10-17 20:49:42Z fraggle $";
+rcsid[] = "$Id: p_inter.c 208 2005-10-17 21:02:57Z fraggle $";
// Data.
@@ -420,9 +424,9 @@ P_TouchSpecialThing
break;
case SPR_SOUL:
- player->health += 100;
- if (player->health > 200)
- player->health = 200;
+ player->health += deh_soulsphere_health;
+ if (player->health > deh_max_soulsphere)
+ player->health = deh_max_soulsphere;
player->mo->health = player->health;
player->message = DEH_String(GOTSUPER);
sound = sfx_getpow;
@@ -431,7 +435,7 @@ P_TouchSpecialThing
case SPR_MEGA:
if (gamemode != commercial)
return;
- player->health = 200;
+ player->health = deh_megasphere_health;
player->mo->health = player->health;
P_GiveArmor (player, deh_blue_armor_class);
player->message = DEH_String(GOTMSPHERE);
diff --git a/src/st_stuff.c b/src/st_stuff.c
index 52168af1..d0031502 100644
--- a/src/st_stuff.c
+++ b/src/st_stuff.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: st_stuff.c 166 2005-10-06 19:36:41Z fraggle $
+// $Id: st_stuff.c 208 2005-10-17 21:02:57Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,10 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.8 2005/10/17 21:02:57 fraggle
+// Dehacked Misc support: Max soulsphere, Soulsphere+Megasphere health bonus
+// values, God mode health value
+//
// Revision 1.7 2005/10/06 19:36:41 fraggle
// Must use the right no clipping cheat for the right game.
//
@@ -52,7 +56,7 @@
//-----------------------------------------------------------------------------
static const char
-rcsid[] = "$Id: st_stuff.c 166 2005-10-06 19:36:41Z fraggle $";
+rcsid[] = "$Id: st_stuff.c 208 2005-10-17 21:02:57Z fraggle $";
#include <stdio.h>
@@ -64,6 +68,7 @@ rcsid[] = "$Id: st_stuff.c 166 2005-10-06 19:36:41Z fraggle $";
#include "w_wad.h"
#include "deh_main.h"
+#include "deh_misc.h"
#include "doomdef.h"
#include "g_game.h"
@@ -508,7 +513,7 @@ ST_Responder (event_t* ev)
if (plyr->mo)
plyr->mo->health = 100;
- plyr->health = 100;
+ plyr->health = deh_god_mode_health;
plyr->message = DEH_String(STSTR_DQDON);
}
else