mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-26 09:00:26 +01:00
Uses LoopSounds() parameters instead of just the alias
This commit is contained in:
1 file changed
+4
-4
@@ -3280,10 +3280,10 @@ void Entity::LoopSound(str sound_name, float volume, float min_dist, float max_d
|
||||
// Add the looping sound to the entity
|
||||
|
||||
edict->s.loopSound = gi.soundindex(name, aliasstreamed);
|
||||
edict->s.loopSoundVolume = aliasvolume;
|
||||
edict->s.loopSoundMinDist = aliasmin_dist;
|
||||
edict->s.loopSoundMaxDist = aliasmax_dist;
|
||||
edict->s.loopSoundPitch = aliaspitch;
|
||||
edict->s.loopSoundVolume = volume < 0 ? (aliasvolume) : (aliasvolume * volume);
|
||||
edict->s.loopSoundMinDist = min_dist < 0 ? (aliasmin_dist) : (min_dist);
|
||||
edict->s.loopSoundMaxDist = max_dist < 0 ? (aliasmax_dist) : (max_dist);
|
||||
edict->s.loopSoundPitch = pitch < 0 ? (aliaspitch) : (aliaspitch * pitch);
|
||||
|
||||
// Local sound will always be heard
|
||||
edict->s.loopSoundFlags = aliaschannel == CHAN_LOCAL;
|
||||
|
||||
Reference in new issue
Block a user