FAForever / fa

Lua code for FAF
228 stars 234 forks source link

[Bug]: Naval Area marker on White Fire created on land #6359

Open relent0r opened 3 months ago

relent0r commented 3 months ago

Describe the Bug

On white fire there is a particular naval area marker that is being created on land on the north side. The south side is correct where the marker is in the water.

I'm unsure what specific circumstances are occurring that cause this. But it means that the AI will build on it but not technically be a naval position.

The impact of this is minimal but if you are setting a layer field on a base manager to decrease the loops required to find base types it will always be considered land as the marker position is not under water.

Note : I couldn't validate via the map editor that if these are purely something that is coming from the nav utilities or if its the map itself.

More context

This is done via the GenerateForExpansion function which lives in /lua/sim/MarkerUtilities/NavalAreas.lua GetPositionsInRadius is used to generate the markers.

Reproduce the bug

Create a game on the 10km white fire map (scmp_033) and enable the map utilities UI.

Then enable Naval Area markers and look below the spawn on the north side.

Attached screenshot for reference.

Screenshots

WhiteFireNavalMarker

Additional context

No response

relent0r commented 3 months ago

@Garanas Do you have any input into this issue. I know I can likely resolve this by checking the water depth on the returned positions and making sure its a certain depth first. This one showed up for me simply because when my AI kept identifying it as a land base due to the marker terrain height not being below the surface height.