summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2007-06-22 11:55:14 +0000
committerSimon Howard2007-06-22 11:55:14 +0000
commitc1cfa2e0914fe451d5fd147beadfcec922878684 (patch)
treec45d57c03efaade0b58e548478d7d7ba56cf6c07 /src
parentd8ecb804f3659a04ad4203b4b11fef30b274b9d5 (diff)
downloadchocolate-doom-c1cfa2e0914fe451d5fd147beadfcec922878684.tar.gz
chocolate-doom-c1cfa2e0914fe451d5fd147beadfcec922878684.tar.bz2
chocolate-doom-c1cfa2e0914fe451d5fd147beadfcec922878684.zip
Replace 35 with TICRATE where appropriate.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 925
Diffstat (limited to 'src')
-rw-r--r--src/d_main.c4
-rw-r--r--src/d_net.c4
-rw-r--r--src/g_game.c6
-rw-r--r--src/i_timer.c3
-rw-r--r--src/net_client.c2
-rw-r--r--src/net_sdl.c2
-rw-r--r--src/p_doors.c6
-rw-r--r--src/p_mobj.c4
-rw-r--r--src/p_plats.c6
-rw-r--r--src/p_spec.c2
10 files changed, 19 insertions, 20 deletions
diff --git a/src/d_main.c b/src/d_main.c
index ca459022..a511daf7 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -512,7 +512,7 @@ void D_DoAdvanceDemo (void)
{
case 0:
if ( gamemode == commercial )
- pagetic = 35 * 11;
+ pagetic = TICRATE * 11;
else
pagetic = 170;
gamestate = GS_DEMOSCREEN;
@@ -537,7 +537,7 @@ void D_DoAdvanceDemo (void)
gamestate = GS_DEMOSCREEN;
if ( gamemode == commercial)
{
- pagetic = 35 * 11;
+ pagetic = TICRATE * 11;
pagename = DEH_String("TITLEPIC");
S_StartMusic(mus_dm2ttl);
}
diff --git a/src/d_net.c b/src/d_net.c
index a46c4c51..c0243e8c 100644
--- 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 @@ static int GetAdjustedTime(void)
time_ms += (offsetms / FRACUNIT);
}
- return (time_ms * FPS) / 1000;
+ return (time_ms * TICRATE) / 1000;
}
//
diff --git a/src/g_game.c b/src/g_game.c
index 9ef99408..ffb93b8b 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1350,9 +1350,9 @@ void G_DoCompleted (void)
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 @@ boolean G_CheckDemoStatus (void)
endtime = I_GetTime ();
realtics = endtime - starttime;
- fps = ((float) gametic * 35) / realtics;
+ fps = ((float) gametic * TICRATE) / realtics;
// Prevent recursive calls
timingdemo = false;
diff --git a/src/i_timer.c b/src/i_timer.c
index c1607e62..5fd7fba9 100644
--- 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 @@ int I_GetTime (void)
ticks -= basetime;
- return (ticks * 35) / 1000;
+ return (ticks * TICRATE) / 1000;
}
//
diff --git a/src/net_client.c b/src/net_client.c
index e367df67..0e2c4559 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -276,7 +276,7 @@ static void NET_CL_ExpandFullTiccmd(net_full_ticcmd_t *cmd, unsigned int seq)
// 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;
diff --git a/src/net_sdl.c b/src/net_sdl.c
index 255feba4..3d737d15 100644
--- a/src/net_sdl.c
+++ b/src/net_sdl.c
@@ -238,7 +238,7 @@ static void NET_SDL_SendPacket(net_addr_t *addr, net_packet_t *packet)
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();
diff --git a/src/p_doors.c b/src/p_doors.c
index 10ad600b..b681a8d0 100644
--- a/src/p_doors.c
+++ b/src/p_doors.c
@@ -138,7 +138,7 @@ void T_VerticalDoor (vldoor_t* door)
case close30ThenOpen:
door->direction = 0;
- door->topcountdown = 35*30;
+ door->topcountdown = TICRATE*30;
break;
default:
@@ -509,7 +509,7 @@ void P_SpawnDoorCloseIn30 (sector_t* sec)
door->direction = 0;
door->type = normal;
door->speed = VDOORSPEED;
- door->topcountdown = 30 * 35;
+ door->topcountdown = 30 * TICRATE;
}
//
@@ -537,7 +537,7 @@ P_SpawnDoorRaiseIn5Mins
door->topheight = P_FindLowestCeilingSurrounding(sec);
door->topheight -= 4*FRACUNIT;
door->topwait = VDOORWAIT;
- door->topcountdown = 5 * 60 * 35;
+ door->topcountdown = 5 * 60 * TICRATE;
}
diff --git a/src/p_mobj.c b/src/p_mobj.c
index 987146d7..29dafdec 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -491,7 +491,7 @@ void P_MobjThinker (mobj_t* mobj)
mobj->movecount++;
- if (mobj->movecount < 12*35)
+ if (mobj->movecount < 12*TICRATE)
return;
if ( leveltime&31 )
@@ -629,7 +629,7 @@ void P_RespawnSpecials (void)
return;
// wait at least 30 seconds
- if (leveltime - itemrespawntime[iquetail] < 30*35)
+ if (leveltime - itemrespawntime[iquetail] < 30*TICRATE)
return;
mthing = &itemrespawnque[iquetail];
diff --git a/src/p_plats.c b/src/p_plats.c
index d0919a0c..03d1acbc 100644
--- a/src/p_plats.c
+++ b/src/p_plats.c
@@ -210,7 +210,7 @@ EV_DoPlat
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 @@ EV_DoPlat
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 @@ EV_DoPlat
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);
diff --git a/src/p_spec.c b/src/p_spec.c
index 67f32194..27042b5d 100644
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -1269,7 +1269,7 @@ void P_SpawnSpecials (void)
if (timelimit > 0)
{
levelTimer = true;
- levelTimeCount = timelimit * 60 * 35;
+ levelTimeCount = timelimit * 60 * TICRATE;
}
else
{