er. more like this.
authornemo
Wed, 08 Aug 2012 11:07:59 -0400
changeset 7519 14261378d074
parent 7517 f287f00063e8
child 7521 093ea41051c5
er. more like this.
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Wed Aug 08 10:26:10 2012 -0400
+++ b/hedgewars/uGears.pas	Wed Aug 08 11:07:59 2012 -0400
@@ -208,24 +208,27 @@
     t:= curHandledGear^.NextGear;
 
     if curHandledGear^.Message and gmDelete <> 0 then
-        DeleteGear(curHandledGear);
-    if curHandledGear^.Message and gmRemoveFromList <> 0 then 
+        DeleteGear(curHandledGear)
+    else
         begin
-        RemoveGearFromList(curHandledGear);
-        // since I can't think of any good reason this would ever be separate from a remove from list, going to keep it inside this block
-        if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear);
-        curHandledGear^.Message:= curHandledGear^.Message and (not (gmRemoveFromList or gmAddToList))
-        end;
-    if curHandledGear^.Active then
-        begin
-        if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then
+        if curHandledGear^.Message and gmRemoveFromList <> 0 then 
+            begin
+            RemoveGearFromList(curHandledGear);
+            // since I can't think of any good reason this would ever be separate from a remove from list, going to keep it inside this block
+            if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear);
+            curHandledGear^.Message:= curHandledGear^.Message and (not (gmRemoveFromList or gmAddToList))
+            end;
+        if curHandledGear^.Active then
             begin
-            FreeTexture(curHandledGear^.Tex);
-            curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall);
-            end;
-        curHandledGear^.doStep(curHandledGear);
-        // might be useful later
-        //ScriptCall('onGearStep', Gear^.uid);
+            if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then
+                begin
+                FreeTexture(curHandledGear^.Tex);
+                curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall);
+                end;
+            curHandledGear^.doStep(curHandledGear);
+            // might be useful later
+            //ScriptCall('onGearStep', Gear^.uid);
+            end
         end
     end;
 curHandledGear:= nil;