hedgewars/uVisualGearsHandlers.pas
changeset 15795 da1bb21e6fbf
parent 15794 95db10dcad71
child 15908 014f4edd0421
child 15929 128ace913837
--- a/hedgewars/uVisualGearsHandlers.pas	Sun Dec 13 21:16:25 2020 +0100
+++ b/hedgewars/uVisualGearsHandlers.pas	Sun Dec 13 21:21:41 2020 +0100
@@ -43,7 +43,7 @@
 procedure doStepEgg(Gear: PVisualGear; Steps: Longword);
 procedure doStepFire(Gear: PVisualGear; Steps: Longword);
 procedure doStepShell(Gear: PVisualGear; Steps: Longword);
-procedure doStepSmallDamage(Gear: PVisualGear; Steps: Longword);
+procedure doStepSmallDamageTag(Gear: PVisualGear; Steps: Longword);
 procedure doStepBubble(Gear: PVisualGear; Steps: Longword);
 procedure doStepSteam(Gear: PVisualGear; Steps: Longword);
 procedure doStepAmmo(Gear: PVisualGear; Steps: Longword);
@@ -402,16 +402,18 @@
     dec(Gear^.FrameTicks, Steps)
 end;
 
-procedure doStepSmallDamage(Gear: PVisualGear; Steps: Longword);
+procedure doStepSmallDamageTag(Gear: PVisualGear; Steps: Longword);
 var s: shortstring;
 begin
-Gear^.Y:= Gear^.Y - 0.02 * Steps;
 if Gear^.Tex = nil then
     begin
     s:= IntToStr(Gear^.State);
     Gear^.Tex:= RenderStringTex(ansistring(s), cWhiteColor, fntSmall);
     end;
 
+Gear^.X:= Gear^.X + Gear^.dX * Steps;
+Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
+
 if Gear^.FrameTicks <= Steps then
     DeleteVisualGear(Gear)
 else
@@ -1042,7 +1044,7 @@
             @doStepExpl,
             @doStepExpl,
             @doStepFire,
-            @doStepSmallDamage,
+            @doStepSmallDamageTag,
             @doStepTeamHealthSorter,
             @doStepSpeechBubble,
             @doStepBubble,