er. more like this.
--- 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;