You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Portals - fix recursive loop looking out from internal rooms
In some situations looking out from an internal room it was possible to look back into the portal into the internal room. This PR fixes this by keeping a single item 'stack' record of the last external room, and preventing recursing into this room. This also makes tracing significantly more efficient out of internal rooms, as there is no need to trace the external room multiple times.
This commit is contained in:
@@ -684,7 +684,7 @@ void PortalRenderer::rooms_finalize(bool p_generate_pvs, bool p_cull_using_pvs,
|
||||
// calculate PVS
|
||||
if (p_generate_pvs) {
|
||||
PVSBuilder pvs;
|
||||
pvs.calculate_pvs(*this, p_pvs_filename);
|
||||
pvs.calculate_pvs(*this, p_pvs_filename, _tracer.get_depth_limit());
|
||||
_cull_using_pvs = p_cull_using_pvs; // hard code to on for test
|
||||
} else {
|
||||
_cull_using_pvs = false;
|
||||
|
||||
Reference in New Issue
Block a user