From 24cccc7029e2dc6d07d483ee5a8d467d733000ef Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 20 Sep 2008 23:23:20 +0000 Subject: Harmonise heretic code on TICRATE and use definition in i_timer.h. Subversion-branch: /branches/raven-branch Subversion-revision: 1262 --- src/heretic/doomdef.h | 2 -- src/heretic/p_enemy.c | 3 ++- src/heretic/p_inter.c | 3 ++- src/heretic/p_spec.c | 5 +++-- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src/heretic') diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h index d9f7f35c..3da11a3c 100644 --- a/src/heretic/doomdef.h +++ b/src/heretic/doomdef.h @@ -83,8 +83,6 @@ extern byte *destview, *destscreen; // PC direct to screen pointers #define NUMARTIFCTS 28 #define MAXPLAYERS 4 -#define TICRATE 35 // number of tics / second -#define TICSPERSEC 35 #define BT_ATTACK 1 #define BT_USE 2 diff --git a/src/heretic/p_enemy.c b/src/heretic/p_enemy.c index 188f7c30..3f752195 100644 --- a/src/heretic/p_enemy.c +++ b/src/heretic/p_enemy.c @@ -26,6 +26,7 @@ #include #include "doomdef.h" #include "i_system.h" +#include "i_timer.h" #include "m_random.h" #include "p_local.h" #include "s_sound.h" @@ -1859,7 +1860,7 @@ void A_HeadAttack(mobj_t * actor) mo->z -= 32 * FRACUNIT; mo->special1 = (int) target; mo->special2 = 50; // Timer for active sound - mo->health = 20 * TICSPERSEC; // Duration + mo->health = 20 * TICRATE; // Duration S_StartSound(actor, sfx_hedat3); } } diff --git a/src/heretic/p_inter.c b/src/heretic/p_inter.c index 20ab5013..25ac3808 100644 --- a/src/heretic/p_inter.c +++ b/src/heretic/p_inter.c @@ -25,6 +25,7 @@ #include "doomdef.h" #include "i_system.h" +#include "i_timer.h" #include "m_random.h" #include "p_local.h" #include "s_sound.h" @@ -1036,7 +1037,7 @@ boolean P_ChickenMorphPlayer(player_t * player) if (player->chickenTics) { - if ((player->chickenTics < CHICKENTICS - TICSPERSEC) + if ((player->chickenTics < CHICKENTICS - TICRATE) && !player->powers[pw_weaponlevel2]) { // Make a super chicken P_GivePower(player, pw_weaponlevel2); diff --git a/src/heretic/p_spec.c b/src/heretic/p_spec.c index 652a0142..0d62ad7e 100644 --- a/src/heretic/p_spec.c +++ b/src/heretic/p_spec.c @@ -25,6 +25,7 @@ #include "doomdef.h" #include "i_system.h" +#include "i_timer.h" #include "m_random.h" #include "p_local.h" #include "s_sound.h" @@ -1207,7 +1208,7 @@ void P_InitAmbientSound(void) { AmbSfxCount = 0; AmbSfxVolume = 0; - AmbSfxTics = 10 * TICSPERSEC; + AmbSfxTics = 10 * TICRATE; AmbSfxPtr = AmbSndSeqInit; } @@ -1287,7 +1288,7 @@ void P_AmbientSound(void) done = true; break; case afxcmd_end: - AmbSfxTics = 6 * TICSPERSEC + P_Random(); + AmbSfxTics = 6 * TICRATE + P_Random(); AmbSfxPtr = LevelAmbientSfx[P_Random() % AmbSfxCount]; done = true; break; -- cgit v1.2.3