Skip to content

Commit

Permalink
Prevent camera from unnecessarily zooming to the same scale value
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusGuy committed Nov 17, 2024
1 parent 8b7b5f7 commit 72684dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/object/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,9 @@ Camera::reload_scale()
void
Camera::ease_scale(float scale, float time, easing ease, AnchorPoint anchor)
{
if (m_scale == scale)
return;

m_scale_anchor = anchor;

if (time <= 0.f)
Expand Down

0 comments on commit 72684dc

Please sign in to comment.