Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
301 stars 52 forks source link

Region compile leaks if no entities in region and camera is inside a structural brush #132

Closed Aciz closed 10 months ago

Aciz commented 1 year ago

If you try to compile a region but have 0 entities, and your camera is currently inside a structural brush, the map will leak.

image

Garux commented 1 year ago

This is expected behavior. Compiler relies on entities placement to determine which side of map volume is playable; the only entity in this case is player spawn, placed at camera location.

Aciz commented 1 year ago

How does it make sense though, considering the outer walls are supposed to be structural? The map shouldn't leak in that case. Also it seems to only happen if the structural brush you're inside of is touching the void, which would suggest that leak testing is done before the region walls are placed, which sounds like a bug to me.

Garux commented 1 year ago

No, this is how compiler's FloodEntities algorithm normally works image You can evaluate mapname.reg, this is what is sent to compiler.