Merge pull request #63581 from madmiraal/fix-63330-3.x

This commit is contained in:
Rémi Verschelde 2022-07-28 18:52:53 +02:00 committed by GitHub
commit ca49a14914
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -254,9 +254,8 @@ void Camera2D::_notification(int p_what) {
// if a camera enters the tree that is set to current,
// it should take over as the current camera, and mark
// all other cameras as non current
_set_current(current);
first = true;
_set_current(current);
} break;
case NOTIFICATION_EXIT_TREE: {
@ -437,7 +436,9 @@ void Camera2D::clear_current() {
void Camera2D::set_limit(Margin p_margin, int p_limit) {
ERR_FAIL_INDEX((int)p_margin, 4);
limit[p_margin] = p_limit;
Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll();
smoothed_camera_pos = old_smoothed_camera_pos;
}
int Camera2D::get_limit(Margin p_margin) const {