Skip to content

fix: three small issues in the HeatMapManager that can cause sublevels to shatter into multiple fragments - #1701

Open
Alex-Guha wants to merge 3 commits into
ryanhcode:mainfrom
Alex-Guha:main
Open

Alex-Guha wants to merge 3 commits into
ryanhcode:mainfrom
Alex-Guha:main

Conversation

@Alex-Guha

Copy link
Copy Markdown

This PR follows from a conversation with Eriksonn in code-chat.


image

Other reports relevant to these issues:
https://discord.com/channels/937435293294919690/937444160254906419/1574084697477222471
https://discord.com/channels/937435293294919690/937444160254906419/1574090272390774834


In each of the following videos that illustrate the three bugs:

  • Greyscale represents the heat, with the root black (I mean, they do say "root" on them :P ).
  • Colors represent floods.
  • A yellow outline indicates that that's where the current step is.
  • A small red cube indicates the block is removed but not yet processed.
  • A cyan outline/glow indicates a new sublevel made by a split (all blocks on the sublevel get the effect). Keyword "new". As you'll see in the first video, the existing sublevel did not get the glow.

Clip of issue 1 (fix): https://github.com/user-attachments/assets/1a01b16b-4fbb-4b6e-a85f-ade844cf95da
Clip of issue 2 (fix): https://github.com/user-attachments/assets/27db0885-3949-4fc6-bd81-e32f0baf5ee2
Clip of issue 3 (fix): https://github.com/user-attachments/assets/f549fbdf-30b4-4d89-80df-9c7325445d72

When the root of a sublevel is broken, floods that meet do not necessarily tell each other who they've already met.

If we have floods A, B, and C:
1) A can meet B
2) C can meet A
3) B only knows about A, not C.
So at the end, we get two separate sublevels, in this example.
…els to get remade

This can happen when a block the flood already reached breaks before the split runs, or when blocks are broken in the same tick as a load, before the first fill finishes.
rebuildHeatmapFrom reset the count and then the part that split off also gets subtracted, and so the count thinks the ship is smaller than it is. Later, if/when the root breaks, the check fails and the ship is rebuilt as a new sublevel.
@CLAassistant

CLAassistant commented Dec 4, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants