mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Ensure changes to Camera2D's limits don't affect smoothed_camera_pos
This commit is contained in:
parent
0d55a30eb1
commit
89737a1ad5
@ -437,7 +437,9 @@ void Camera2D::clear_current() {
|
|||||||
void Camera2D::set_limit(Margin p_margin, int p_limit) {
|
void Camera2D::set_limit(Margin p_margin, int p_limit) {
|
||||||
ERR_FAIL_INDEX((int)p_margin, 4);
|
ERR_FAIL_INDEX((int)p_margin, 4);
|
||||||
limit[p_margin] = p_limit;
|
limit[p_margin] = 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(Margin p_margin) const {
|
int Camera2D::get_limit(Margin p_margin) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user