Browse Source

Merge pull request #50977 from lawnjelly/portals_fix_autolink_internal

Rémi Verschelde 4 years ago
parent
commit
5d4352fad4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      scene/3d/room_manager.cpp

+ 4 - 0
scene/3d/room_manager.cpp

@@ -924,6 +924,10 @@ void RoomManager::_autolink_portals(Spatial *p_roomlist, LocalVector<Portal *> &
 					// send complete link to visual server so the portal will be active in the visual server room system
 					// send complete link to visual server so the portal will be active in the visual server room system
 					VisualServer::get_singleton()->portal_link(portal->_portal_rid, source_room->_room_rid, room->_room_rid, portal->_settings_two_way);
 					VisualServer::get_singleton()->portal_link(portal->_portal_rid, source_room->_room_rid, room->_room_rid, portal->_settings_two_way);
 
 
+					// make the portal internal if necessary
+					// (this prevents the portal plane clipping the room bound)
+					portal->_internal = source_room->_room_priority > room->_room_priority;
+
 					autolink_found = true;
 					autolink_found = true;
 					break;
 					break;
 				}
 				}