mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Sound volume distance indication now scales with mapheader scale.
This commit is contained in:
parent
92d5a6b8fb
commit
e5fef95d94
2 changed files with 3 additions and 1 deletions
|
@ -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,
|
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;
|
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)
|
if (dist > 1536<<FRACBITS)
|
||||||
continue;
|
continue;
|
||||||
else if (dist < 160<<FRACBITS) // engine sounds' approx. range
|
else if (dist < 160<<FRACBITS) // engine sounds' approx. range
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ fixed_t S_CalculateSoundDistance(fixed_t sx1, fixed_t sy1, fixed_t sz1, fixed_t
|
||||||
|
|
||||||
approx_dist <<= FRACBITS;
|
approx_dist <<= FRACBITS;
|
||||||
|
|
||||||
return approx_dist;
|
return FixedDiv(approx_dist, mapheaderinfo[gamemap-1]->mobj_scale); // approx_dist
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue