summaryrefslogtreecommitdiff
path: root/src/heretic
diff options
context:
space:
mode:
authorSimon Howard2008-09-20 23:23:20 +0000
committerSimon Howard2008-09-20 23:23:20 +0000
commit24cccc7029e2dc6d07d483ee5a8d467d733000ef (patch)
tree45e9116b0a22b5061117e178a2d90b0c7363769a /src/heretic
parentb3fdd717d3d0a9255a035f99af0cb2e6c1515008 (diff)
downloadchocolate-doom-24cccc7029e2dc6d07d483ee5a8d467d733000ef.tar.gz
chocolate-doom-24cccc7029e2dc6d07d483ee5a8d467d733000ef.tar.bz2
chocolate-doom-24cccc7029e2dc6d07d483ee5a8d467d733000ef.zip
Harmonise heretic code on TICRATE and use definition in i_timer.h.
Subversion-branch: /branches/raven-branch Subversion-revision: 1262
Diffstat (limited to 'src/heretic')
-rw-r--r--src/heretic/doomdef.h2
-rw-r--r--src/heretic/p_enemy.c3
-rw-r--r--src/heretic/p_inter.c3
-rw-r--r--src/heretic/p_spec.c5
4 files changed, 7 insertions, 6 deletions
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 <stdlib.h>
#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;