summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Haley2010-09-03 04:36:34 +0000
committerJames Haley2010-09-03 04:36:34 +0000
commit995b6bf6acdebf8cb46f680a24d93430fc23a85f (patch)
treecaae842ece31b576b8b4b4b27aec0d57285d4c27 /src
parentab0dc8fcb49a71db33e26f9c01e88d24e43c556e (diff)
downloadchocolate-doom-995b6bf6acdebf8cb46f680a24d93430fc23a85f.tar.gz
chocolate-doom-995b6bf6acdebf8cb46f680a24d93430fc23a85f.tar.bz2
chocolate-doom-995b6bf6acdebf8cb46f680a24d93430fc23a85f.zip
Minor reformatting and elimination of a redundant branch condition
(Watcom for the win!) Subversion-branch: /branches/strife-branch Subversion-revision: 2005
Diffstat (limited to 'src')
-rw-r--r--src/strife/r_main.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/strife/r_main.c b/src/strife/r_main.c
index ddb583d3..bc902e4a 100644
--- a/src/strife/r_main.c
+++ b/src/strife/r_main.c
@@ -837,23 +837,20 @@ R_PointInSubsector
void R_SetupPitch(player_t* player)
{
- fixed_t pitchfrac;
+ int pitchfrac;
int i = 0;
if(viewpitch != player->pitch)
{
viewpitch = player->pitch;
- pitchfrac = ((setblocks*player->pitch)/10);
- centery = pitchfrac+viewheight/2;
- centeryfrac = centery<<FRACBITS;
+ pitchfrac = (setblocks * player->pitch) / 10;
+ centery = pitchfrac + viewheight / 2;
+ centeryfrac = centery << FRACBITS;
- if(viewheight > 0)
+ for(i = 0; i < viewheight; i++)
{
- for(i = 0; i < viewheight; i++)
- {
- yslope[i] = FixedDiv(viewwidth/2*FRACUNIT,
- abs(((i-centery)<<FRACBITS)+(FRACUNIT/2)));
- }
+ yslope[i] = FixedDiv(viewwidth / 2 * FRACUNIT,
+ abs(((i - centery) << FRACBITS) + (FRACUNIT/2)));
}
}
}