--- a/hedgewars/uGearsHandlersMess.pas Sun Oct 22 00:48:38 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas Sun Oct 22 02:25:27 2017 +0200
@@ -994,11 +994,14 @@
var
t: hwFloat;
gX,gY,i: LongInt;
- uw, nuw: boolean;
+ uw, nuw, wrapped: boolean;
flower: PVisualGear;
begin
- WorldWrap(Gear);
+ wrapped:= WorldWrap(Gear);
+ if wrapped then
+ HomingWrap(Gear);
+
AllInactive := false;
gX := hwRound(Gear^.X);
gY := hwRound(Gear^.Y);
@@ -1116,6 +1119,9 @@
Gear^.SoundChannel := LoopSound(sndBee);
Gear^.Timer := 5000;
+
+ HomingWrap(Gear);
+
// save initial speed in otherwise unused Friction variable
Gear^.Friction := Distance(Gear^.dX, Gear^.dY);
Gear^.doStep := @doStepBeeWork