ref: 24cccc7029e2dc6d07d483ee5a8d467d733000ef
parent: b3fdd717d3d0a9255a035f99af0cb2e6c1515008
author: Simon Howard <fraggle@gmail.com>
date: Sat Sep 20 19:23:20 EDT 2008
Harmonise heretic code on TICRATE and use definition in i_timer.h. Subversion-branch: /branches/raven-branch Subversion-revision: 1262
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -83,8 +83,6 @@
#define NUMARTIFCTS 28
#define MAXPLAYERS 4
-#define TICRATE 35 // number of tics / second
-#define TICSPERSEC 35
#define BT_ATTACK 1
#define BT_USE 2
--- 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 @@
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);
}
}
--- 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 @@
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);
--- 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 @@
{
AmbSfxCount = 0;
AmbSfxVolume = 0;
- AmbSfxTics = 10 * TICSPERSEC;
+ AmbSfxTics = 10 * TICRATE;
AmbSfxPtr = AmbSndSeqInit;
}
@@ -1287,7 +1288,7 @@
done = true;
break;
case afxcmd_end:
- AmbSfxTics = 6 * TICSPERSEC + P_Random();
+ AmbSfxTics = 6 * TICRATE + P_Random();
AmbSfxPtr = LevelAmbientSfx[P_Random() % AmbSfxCount];
done = true;
break;