Merge pull request #94035 from markdibarry/parallax2d-remove-unused
Remove unused assignment in Parallax2D
This commit is contained in:
commit
d7b1d8440c
1 changed files with 3 additions and 4 deletions
|
@ -86,11 +86,10 @@ void Parallax2D::_update_scroll() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Point2 scroll_ofs = screen_offset;
|
Point2 scroll_ofs = screen_offset;
|
||||||
Size2 vps = get_viewport_rect().size;
|
|
||||||
|
|
||||||
if (Engine::get_singleton()->is_editor_hint()) {
|
if (!Engine::get_singleton()->is_editor_hint()) {
|
||||||
vps = Size2(GLOBAL_GET("display/window/size/viewport_width"), GLOBAL_GET("display/window/size/viewport_height"));
|
Size2 vps = get_viewport_rect().size;
|
||||||
} else {
|
|
||||||
if (limit_begin.x <= limit_end.x - vps.x) {
|
if (limit_begin.x <= limit_end.x - vps.x) {
|
||||||
scroll_ofs.x = CLAMP(scroll_ofs.x, limit_begin.x, limit_end.x - vps.x);
|
scroll_ofs.x = CLAMP(scroll_ofs.x, limit_begin.x, limit_end.x - vps.x);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue