diff --git a/Source/i_sound.c b/Source/i_sound.c index 4a0fc425..62f3f980 100644 --- a/Source/i_sound.c +++ b/Source/i_sound.c @@ -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]; diff --git a/Source/p_enemy.c b/Source/p_enemy.c index c76c9080..7b6d78c3 100644 --- a/Source/p_enemy.c +++ b/Source/p_enemy.c @@ -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 diff --git a/Source/p_map.c b/Source/p_map.c index 9e34e7e7..706635a1 100644 --- a/Source/p_map.c +++ b/Source/p_map.c @@ -1079,7 +1079,7 @@ static void P_HitSlideLine(line_t *ld) icyfloor = !compatibility && variable_friction && slidemo->player && - onground && + onground && slidemo->friction > ORIG_FRICTION; } diff --git a/Source/p_setup.c b/Source/p_setup.c index 5e85f8d8..60f86102 100644 --- a/Source/p_setup.c +++ b/Source/p_setup.c @@ -1049,7 +1049,7 @@ boolean P_LoadBlockMap (int lump) if (demo_version >= 200 && demo_version < 203) P_CreateBlockMapBoom(); else - P_CreateBlockMap(); + P_CreateBlockMap(); } else { diff --git a/Source/p_user.c b/Source/p_user.c index e4474cc5..02281ea4 100644 --- a/Source/p_user.c +++ b/Source/p_user.c @@ -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)) @@ -120,7 +119,7 @@ void P_CalcHeight (player_t* player) } else { - if (player->bob > MAXBOB) + if (player->bob > MAXBOB) player->bob = MAXBOB; } @@ -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 { diff --git a/Source/r_data.c b/Source/r_data.c index e8e4655d..77037c94 100644 --- a/Source/r_data.c +++ b/Source/r_data.c @@ -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); } } diff --git a/Source/w_wad.c b/Source/w_wad.c index 7c73b59e..5e53837d 100644 --- a/Source/w_wad.c +++ b/Source/w_wad.c @@ -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