[1.1.69] Highlight-box targeting entity not visible if tick is paused

This subforum contains all the issues which we already resolved.
Post Reply
GlassBricks
Inserter
Inserter
Posts: 25
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

[1.1.69] Highlight-box targeting entity not visible if tick is paused

Post by GlassBricks »

Steps to reproduce:

- Create a freeplay save (no mods)
- Go to editor mode (this pauses ticks)
- Build an entity (tested with iron-chest)
- Create a highlight box around that entity ( /c game.surfaces[1].create_entity{name = "highlight-box", position = game.player.selected.position, target = game.player.selected} )

I expect to see the highlight box, however, the highlight box is not be visible until ticks are un-paused.

Highlight boxes will still appear around other entities (like generated trees, etc.) or entities built before ticks were paused.
Also reproducing this is a bit finnicky; sometimes the highlight box still becomes visible on a just-built entity when ticks are paused. However following the above steps exactly does consistently reproduce this.

Use case (how I found this bug):
I have a mod which is meant to be used in editor mode, where highlight boxes are used as indicators. However, when the tick is paused (which is normal in editor mode), sometimes the highlight boxes aren't visible until ticks are unpaused. Investigating with no mods in freeplay led to the above.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.69] Highlight-box targeting entity not visible if tick is paused

Post by boskid »

Ok, i did tiny tweaks to make the HighlightBoxEntity behave slightly better: it will perform copy of target's selectionBox immediately during construction without waiting for next update call. That has some important behavior changes because copy of this selection box is then used as a bounding box of this entity which has to be in correct place of a surface to be rendered. Before fix it would get a default bounding box which would register the HighlightBoxEntity on advanced tiles somewhere near the {0,0} which causes issues not only related to rendering.

Issue should be now fixed for 1.1.70.

Post Reply

Return to “Resolved Problems and Bugs”