some minor fixes and clean-ups

mostly to satisfy my desire for smallest possible diff and white space
changes
This commit is contained in:
Fabian Greffrath 2021-02-17 14:12:14 +01:00
parent b1daa874c5
commit bddeb3927c
7 changed files with 12 additions and 13 deletions

View File

@ -231,7 +231,7 @@ static boolean addsfx(sfxinfo_t *sfx, int channel, int pitch)
SOUNDHDRSIZE = 44;
}
// Check the header, and ensure this is a valid sound
else if(data[0] == 0x03 || data[1] == 0x00)
else if(data[0] == 0x03 && data[1] == 0x00)
{
samplerate = (data[3] << 8) | data[2];
samplelen = (data[7] << 24) | (data[6] << 16) | (data[5] << 8) | data[4];

View File

@ -2110,7 +2110,6 @@ void A_Mushroom(mobj_t *actor)
if (demo_version < 203)
return;
A_Explode(actor); // make normal explosion
for (i = -n; i <= n; i += 8) // launch mushroom cloud

View File

@ -1049,7 +1049,7 @@ boolean P_LoadBlockMap (int lump)
if (demo_version >= 200 && demo_version < 203)
P_CreateBlockMapBoom();
else
P_CreateBlockMap();
P_CreateBlockMap();
}
else
{

View File

@ -111,8 +111,7 @@ void P_CalcHeight (player_t* player)
(demo_version >= 203 && player_bobbing) ? (FixedMul(player->momx,player->momx) +
FixedMul(player->momy,player->momy))>>2 : 0;
if ((demo_version == 202 ||
demo_version == 203) &&
if ((demo_version == 202 || demo_version == 203) &&
player->mo->friction > ORIG_FRICTION) // ice?
{
if (player->bob > (MAXBOB>>2))
@ -199,7 +198,8 @@ void P_MovePlayer (player_t* player)
// ice, because the player still "works just as hard" to move, while the
// thrust applied to the movement varies with 'movefactor'.
if ((!demo_compatibility && demo_version < 203) || cmd->forwardmove | cmd->sidemove) // killough 10/98
if ((!demo_compatibility && demo_version < 203) ||
cmd->forwardmove | cmd->sidemove) // killough 10/98
{
if (onground || mo->flags & MF_BOUNCES) // killough 8/9/98
{

View File

@ -364,7 +364,7 @@ static void R_GenerateLookup(int texnum, int *const errors)
{
// killough 12/98: Warn about a common column construction bug
unsigned limit = texture->height*3+3; // absolute column size limit
int badcol = devparm||true; // warn only if -devparm used
int badcol = devparm+1; // warn only if -devparm used
for (i = texture->patchcount, patch = texture->patches; --i >= 0;)
{
@ -423,7 +423,7 @@ static void R_GenerateLookup(int texnum, int *const errors)
{
if (!count[x].patches) // killough 4/9/98
// [FG] treat missing patches as non-fatal
if (devparm||true)
if (devparm+1)
{
// killough 8/8/98
printf("\nR_GenerateLookup:"
@ -554,7 +554,7 @@ void R_InitTextures (void)
patchlookup[i] = (W_CheckNumForName)(name, ns_sprites);
if (patchlookup[i] == -1) // && devparm) // killough 8/8/98
if (patchlookup[i] == -1 && devparm+1) // killough 8/8/98
printf("\nWarning: patch %.8s, index %d does not exist",name,i);
}
}

View File

@ -272,8 +272,8 @@ static void W_CoalesceMarkedResource(const char *start_marker,
// as an 'empty' graphics resource
if(namespace != ns_sprites || lump->size > 8)
{
marked[num_marked] = *lump;
marked[num_marked++].namespace = namespace; // killough 4/17/98
marked[num_marked] = *lump;
marked[num_marked++].namespace = namespace; // killough 4/17/98
}
}
else