mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +00:00
Merge branch 'sounddistfix' into 'master'
Sound volume distance indication now scales with mapheader scale. See merge request KartKrew/Kart!105
This commit is contained in:
commit
159d8040b8
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,
|
||||
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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue