summaryrefslogtreecommitdiff
path: root/src/strife/p_user.c
diff options
context:
space:
mode:
authorJames Haley2010-08-31 01:55:51 +0000
committerJames Haley2010-08-31 01:55:51 +0000
commit5871acd3de5a88ea06d18f80a8f1dddc552e993e (patch)
tree4329d82fc2c25de889917050014f1b6d4968279d /src/strife/p_user.c
parentb6ea4375e0b5db116a1cdf27e30273d4a92b7a53 (diff)
downloadchocolate-doom-5871acd3de5a88ea06d18f80a8f1dddc552e993e.tar.gz
chocolate-doom-5871acd3de5a88ea06d18f80a8f1dddc552e993e.tar.bz2
chocolate-doom-5871acd3de5a88ea06d18f80a8f1dddc552e993e.zip
Revamped player_t to match binary layout of structure, aside from
enum-determined arrays which will be tackled individually. Removed player itemcount, secretcount, and didsecret fields. Changed armorpoints, armortype, and killcount to shorts. Added all runtime Strife sector types and changed handling of DOOM types where appropriate. Added nukagecount handling in P_PlayerThink. Subversion-branch: /branches/strife-branch Subversion-revision: 1981
Diffstat (limited to 'src/strife/p_user.c')
-rw-r--r--src/strife/p_user.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/strife/p_user.c b/src/strife/p_user.c
index 2ff7f818..609704a0 100644
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -336,6 +336,18 @@ void P_PlayerThink (player_t* player)
// Counters, time dependend power ups.
+ // haleyjd 08/30/10: [STRIFE]
+ // Nukage count keeps track of exposure to hazardous conditions over time.
+ // After accumulating 16 total seconds or more of exposure, you will take
+ // 5 damage roughly once per second until the count drops back under 560
+ // tics.
+ if (player->nukagecount)
+ {
+ player->nukagecount--;
+ if (!(leveltime & 0x1f) && player->nukagecount > 16*TICRATE)
+ P_DamageMobj(player->mo, NULL, NULL, 5);
+ }
+
// Strength counts up to diminish fade.
if (player->powers[pw_strength])
player->powers[pw_strength]++;