File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Source/RunActivity/Viewer3D Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -494,15 +494,17 @@ public class SoundSource : SoundSourceBase
494
494
{
495
495
/// <summary>
496
496
/// Squared cutoff distance. No sound is audible above that, except for the actual player train,
497
- /// where cutoff occurs at a distance wich is higher than the train length
497
+ /// where cutoff occurs at a distance wich is higher than the train length plus offset to
498
+ /// approximately take into account distance from camera to car
498
499
/// </summary>
499
500
private int CutOffDistanceM2
500
501
{
501
502
get
502
503
{
503
504
const int staticDistanceM2 = 4000000 ;
504
505
var isPlayer = Car ? . Train ? . IsActualPlayerTrain ?? false ;
505
- return ( int ) Math . Max ( staticDistanceM2 , isPlayer ? Car . Train . Length * Car . Train . Length : 0 ) ;
506
+ var correctedLength = isPlayer ? Car . Train . Length + 50 : 0 ;
507
+ return ( int ) Math . Max ( staticDistanceM2 , correctedLength * correctedLength ) ;
506
508
}
507
509
}
508
510
/// <summary>
You can’t perform that action at this time.
0 commit comments