Don't do anything if sorter was replaced, even for one tick only. Hopefully fixes issue #907, but not confirmed, though very highly plausible.
authorunc0rr
Tue, 17 Mar 2015 23:57:26 +0300
changeset 10858 bd281e854e02
parent 10857 6ef0fb6cd3bb
child 10859 d7e3abe3d5c2
Don't do anything if sorter was replaced, even for one tick only. Hopefully fixes issue #907, but not confirmed, though very highly plausible.
hedgewars/uVisualGearsHandlers.pas
--- a/hedgewars/uVisualGearsHandlers.pas	Mon Mar 16 11:12:18 2015 +0300
+++ b/hedgewars/uVisualGearsHandlers.pas	Tue Mar 17 23:57:26 2015 +0300
@@ -515,7 +515,8 @@
 procedure doStepTeamHealthSorterWork(Gear: PVisualGear; Steps: Longword);
 var i, t, h: LongInt;
 begin
-for t:= 1 to min(Steps, Gear^.Timer) do
+if currsorter = Gear then
+  for t:= 1 to min(Steps, Gear^.Timer) do
     begin
     dec(Gear^.Timer);
     if (Gear^.Timer and 15) = 0 then