Ability to play sounds only in LOS
Posted: 13 Apr 2012, 12:29
In order to make sounds more contextual, I'm exploring the ways to only play them when the player has line of sight. Currently mod sounds from weapons are played by the engine from weapons.tdf using the tags soundstart for shooting a projectile, and soundhit for the explosion sound. But is there a way to make these be contingent upon having line of sight?
Only hack I can think of is replacing those sound files with dummy, silent sounds and handling the explosion sounds myself, via tracking projectiles and explosions. But that is unelegant and hackish. Any better solution? Is this already possible?
Only hack I can think of is replacing those sound files with dummy, silent sounds and handling the explosion sounds myself, via tracking projectiles and explosions. But that is unelegant and hackish. Any better solution? Is this already possible?