hedgewars/uGearsUtils.pas
changeset 15753 72f735c03fec
parent 15741 8997e212be4c
child 15788 acf70c44065b
--- a/hedgewars/uGearsUtils.pas	Thu Oct 22 12:33:35 2020 +0200
+++ b/hedgewars/uGearsUtils.pas	Thu Oct 22 12:50:24 2020 +0200
@@ -1903,9 +1903,10 @@
 function HomingWrap(var Gear: PGear): boolean;
 var dist_center, dist_right, dist_left: hwFloat;
 begin
+    HomingWrap:= false;
+
     if WorldEdge = weWrap then
         begin
-        HomingWrap:= false;
         // We just check the same target 3 times:
         // 1) in current section (no change)
         // 2) clone in the right section