Monday, August 3, 2015

FMod - Links View Bugfix

Yesterday I confirmed the presence of an Abiathar bug that I had heard about once or twice, but was not sure actually existed. It definitely does - it is possible in certain circumstances for Abiathar's links rendering mode (View | Links) to stop drawing existing links. That was really hard to reproduce, but my Minimal Complete Verifiable Example for it is:

  1. Make sure View | Links is off
  2. Move to a level that contains link infoplane values
  3. Place a link infoplane value
  4. Turn on View | Links
  5. See that only the new value renders as a link
The problem was that LinksRenderPlane's Rendered field (which is used to tell the renderer whether to do a full re-render) was set to True by DrawLinks, which is called from the tile change handler to update the link for one tile. So, after that runs (which it does even when the LinksRenderPlane is not visible), Rendered is True so FindLinks (which is responsible for scanning the level for links) is not run.

I moved the Rendered = True statement to the end of the Render implementation so it's only called after the initial full render pass.

No comments:

Post a Comment