Skip to content

Commit

Permalink
Recycle utility points
Browse files Browse the repository at this point in the history
  • Loading branch information
01010111 committed Jul 3, 2024
1 parent 090543c commit 6e7def0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zero/flixel/depth/DepthCamera.hx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ class DepthCamera extends FlxObject {
var offset = FlxPoint.get(point.x - FlxG.width/2, point.y - FlxG.height/2);
offset.degrees -= camera.angle;

return point.set(cam_midp.x + offset.x, cam_midp.y + offset.y);
point.set(cam_midp.x + offset.x, cam_midp.y + offset.y);
cam_midp.put();
offset.put();

return point;
}

}

0 comments on commit 6e7def0

Please sign in to comment.