Merge pull request #63580 from madmiraal/fix-63330

This commit is contained in:
Rémi Verschelde 2022-07-28 18:37:10 +02:00 committed by GitHub
commit c4d7a5d22a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -247,8 +247,8 @@ void Camera2D::_notification(int p_what) {
add_to_group(canvas_group_name); add_to_group(canvas_group_name);
_update_process_callback(); _update_process_callback();
_update_scroll();
first = true; first = true;
_update_scroll();
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
@ -439,7 +439,9 @@ void Camera2D::clear_current() {
void Camera2D::set_limit(Side p_side, int p_limit) { void Camera2D::set_limit(Side p_side, int p_limit) {
ERR_FAIL_INDEX((int)p_side, 4); ERR_FAIL_INDEX((int)p_side, 4);
limit[p_side] = p_limit; limit[p_side] = p_limit;
Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll(); _update_scroll();
smoothed_camera_pos = old_smoothed_camera_pos;
} }
int Camera2D::get_limit(Side p_side) const { int Camera2D::get_limit(Side p_side) const {