ref: c1cfa2e0914fe451d5fd147beadfcec922878684
parent: d8ecb804f3659a04ad4203b4b11fef30b274b9d5
author: Simon Howard <[email protected]>
date: Fri Jun 22 07:55:14 EDT 2007
Replace 35 with TICRATE where appropriate. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 925
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -512,7 +512,7 @@
{
case 0:
if ( gamemode == commercial )
- pagetic = 35 * 11;
+ pagetic = TICRATE * 11;
else
pagetic = 170;
gamestate = GS_DEMOSCREEN;
@@ -537,7 +537,7 @@
gamestate = GS_DEMOSCREEN;
if ( gamemode == commercial)
{
- pagetic = 35 * 11;
+ pagetic = TICRATE * 11;
pagename = DEH_String("TITLEPIC");
S_StartMusic(mus_dm2ttl);
}
--- a/src/d_net.c
+++ b/src/d_net.c
@@ -50,8 +50,6 @@
#include "net_loop.h"
-#define FPS 35
-
//
// NETWORKING
//
@@ -109,7 +107,7 @@
time_ms += (offsetms / FRACUNIT);
}
- return (time_ms * FPS) / 1000;
+ return (time_ms * TICRATE) / 1000;
}
//
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1350,9 +1350,9 @@
wminfo.maxsecret = totalsecret;
wminfo.maxfrags = 0;
if ( gamemode == commercial )
- wminfo.partime = 35*cpars[gamemap-1];
+ wminfo.partime = TICRATE*cpars[gamemap-1];
else
- wminfo.partime = 35*pars[gameepisode][gamemap];
+ wminfo.partime = TICRATE*pars[gameepisode][gamemap];
wminfo.pnum = consoleplayer;
for (i=0 ; i<MAXPLAYERS ; i++)
@@ -2017,7 +2017,7 @@
endtime = I_GetTime ();
realtics = endtime - starttime;
- fps = ((float) gametic * 35) / realtics;
+ fps = ((float) gametic * TICRATE) / realtics;
// Prevent recursive calls
timingdemo = false;
--- a/src/i_timer.c
+++ b/src/i_timer.c
@@ -27,6 +27,7 @@
#include "SDL.h"
#include "i_timer.h"
+#include "doomdef.h"
//
// I_GetTime
@@ -46,7 +47,7 @@
ticks -= basetime;
- return (ticks * 35) / 1000;
+ return (ticks * TICRATE) / 1000;
}
//
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -276,7 +276,7 @@
// the same lag. Don't adjust in the first few tics of play, as
// we don't have an accurate value for average_latency yet.
- if (seq > 35)
+ if (seq > TICRATE)
{
adjustment = (cmd->latency * FRACUNIT) - average_latency;
--- a/src/net_sdl.c
+++ b/src/net_sdl.c
@@ -238,7 +238,7 @@
this_second_sent += packet->len + 64;
- if (I_GetTime() - lasttime > 35)
+ if (I_GetTime() - lasttime > TICRATE)
{
printf("%i bytes sent in the last second\n", this_second_sent);
lasttime = I_GetTime();
--- a/src/p_doors.c
+++ b/src/p_doors.c
@@ -138,7 +138,7 @@
case close30ThenOpen:
door->direction = 0;
- door->topcountdown = 35*30;
+ door->topcountdown = TICRATE*30;
break;
default:
@@ -509,7 +509,7 @@
door->direction = 0;
door->type = normal;
door->speed = VDOORSPEED;
- door->topcountdown = 30 * 35;
+ door->topcountdown = 30 * TICRATE;
}
//
@@ -537,7 +537,7 @@
door->topheight = P_FindLowestCeilingSurrounding(sec);
door->topheight -= 4*FRACUNIT;
door->topwait = VDOORWAIT;
- door->topcountdown = 5 * 60 * 35;
+ door->topcountdown = 5 * 60 * TICRATE;
}
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -491,7 +491,7 @@
mobj->movecount++;
- if (mobj->movecount < 12*35)
+ if (mobj->movecount < 12*TICRATE)
return;
if ( leveltime&31 )
@@ -629,7 +629,7 @@
return;
// wait at least 30 seconds
- if (leveltime - itemrespawntime[iquetail] < 30*35)
+ if (leveltime - itemrespawntime[iquetail] < 30*TICRATE)
return;
mthing = &itemrespawnque[iquetail];
--- a/src/p_plats.c
+++ b/src/p_plats.c
@@ -210,7 +210,7 @@
plat->low = sec->floorheight;
plat->high = sec->floorheight;
- plat->wait = 35*PLATWAIT;
+ plat->wait = TICRATE*PLATWAIT;
plat->status = down;
S_StartSound(&sec->soundorg,sfx_pstart);
break;
@@ -223,7 +223,7 @@
plat->low = sec->floorheight;
plat->high = sec->floorheight;
- plat->wait = 35*PLATWAIT;
+ plat->wait = TICRATE*PLATWAIT;
plat->status = down;
S_StartSound(&sec->soundorg,sfx_pstart);
break;
@@ -240,7 +240,7 @@
if (plat->high < sec->floorheight)
plat->high = sec->floorheight;
- plat->wait = 35*PLATWAIT;
+ plat->wait = TICRATE*PLATWAIT;
plat->status = P_Random()&1;
S_StartSound(&sec->soundorg,sfx_pstart);
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -1269,7 +1269,7 @@
if (timelimit > 0)
{
levelTimer = true;
- levelTimeCount = timelimit * 60 * 35;
+ levelTimeCount = timelimit * 60 * TICRATE;
}
else
{