Go to file
Kp 771eecf695 Fix ambient sound effects
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.
2018-04-09 00:58:28 +00:00
common Simplify visited_segment_mask_t 2018-04-09 00:58:28 +00:00
contrib Add support for PNG screenshots 2018-02-18 00:42:42 +00:00
d1x-rebirth Make eclip_num unsigned 2018-03-31 21:53:01 +00:00
d2x-rebirth Mark buddy_message_* functions as printf format 2018-04-03 03:20:08 +00:00
Documentation Require support for reference qualified methods 2016-12-10 17:51:07 +00:00
similar Fix ambient sound effects 2018-04-09 00:58:28 +00:00
.gitattributes Add experimental Windows manifest 2017-08-02 02:49:12 +00:00
.gitignore ignore XCode user data 2014-12-06 22:43:12 -08:00
COPYING.txt corrected typo in COPYING.txt (it's to its) 2014-06-06 13:18:52 +02:00
GPL-3.txt Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
INSTALL.markdown Restore GOG reference in INSTALL.markdown 2017-11-25 01:56:51 +00:00
SConstruct Simplify host_platform normalization 2018-03-27 03:49:34 +00:00