Sound volume distance indication now scales with mapheader scale.

This commit is contained in:
toaster committed 2018-11-25 13:30:43 +00:00
1 parent 92d5a6b8fb
commit e5fef95d94
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -3966,6 +3966,8 @@ static void K_UpdateEngineSounds(player_t *player, ticcmd_t *cmd)
dist = P_AproxDistance(P_AproxDistance(player->mo->x-players[i].mo->x,
player->mo->y-players[i].mo->y), player->mo->z-players[i].mo->z) / 2;
dist = FixedDiv(dist, mapheaderinfo[gamemap-1]->mobj_scale);
if (dist > 1536<<FRACBITS)
continue;
else if (dist < 160<<FRACBITS) // engine sounds' approx. range
+1 -1
View File
@@ -1199,7 +1199,7 @@ fixed_t S_CalculateSoundDistance(fixed_t sx1, fixed_t sy1, fixed_t sz1, fixed_t
approx_dist <<= FRACBITS;
return approx_dist;
return FixedDiv(approx_dist, mapheaderinfo[gamemap-1]->mobj_scale); // approx_dist
}
//