771eecf695
Ambient sound effects have always been buggy in certain topologies, since `ambient_mark_bfs` refuses to cross its own path. Consider a corridor: L _ _ _ _ _ _ _ _ _ _ _ _ _ L Where L is a lavafall emitting sound, whitespace is insignificant, _ is a segment, * is a tagged segment, and / is a segment that should be tagged, but is not. Let the leftmost L be a lower number segment than the lower L. Sound propagation after the first step is: L * * * * * _ _ _ _ _ * _ * L After the second step, it should be: L * * * * * * * * _ _ * * * L However, `ambient_mark_bfs` will stop when it hits the intersection, so instead the result is: L * * * * * / / / _ _ * * * L To further confuse the issue, emitter segments are processed in memory order, so if the leftmost L is a higher index segment than the lower L, the lower L will be processed first and the steps will be: L _ * * * * * * * _ _ _ * _ L L * * * * * * * * _ _ / * / L Rewrite the propagation to record the travel depth remaining at each node, and permit it to cross a segment with a lower depth remaining than the current step. This still stops early when traversal attempts to backtrack over itself, but permits it to visit, tag, and cross segments that were previously visited by a different emitter. |
||
---|---|---|
.. | ||
2d | ||
3d | ||
arch | ||
editor | ||
main | ||
misc |