♻️ Replace Point addition with 'Point + Displacement'
This commit is contained in:
parent
0441ffc2f4
commit
cbb84199c2
23 changed files with 264 additions and 272 deletions
|
|
@ -1151,7 +1151,7 @@ bool calc_snd_position(Point soundPosition, int *plVolume, int *plPan)
|
|||
const auto &playerPosition = plr[myplr].position.tile;
|
||||
const auto delta = soundPosition - playerPosition;
|
||||
|
||||
pan = (delta.x - delta.y) * 256;
|
||||
pan = (delta.deltaX - delta.deltaY) * 256;
|
||||
*plPan = clamp(pan, PAN_MIN, PAN_MAX);
|
||||
|
||||
volume = playerPosition.ApproxDistance(soundPosition);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue