hedgewars/uGears.pas
changeset 7519 14261378d074
parent 7517 f287f00063e8
child 7575 f415b3e0f3b9
equal deleted inserted replaced
7517:f287f00063e8 7519:14261378d074
   206     begin
   206     begin
   207     curHandledGear:= t;
   207     curHandledGear:= t;
   208     t:= curHandledGear^.NextGear;
   208     t:= curHandledGear^.NextGear;
   209 
   209 
   210     if curHandledGear^.Message and gmDelete <> 0 then
   210     if curHandledGear^.Message and gmDelete <> 0 then
   211         DeleteGear(curHandledGear);
   211         DeleteGear(curHandledGear)
   212     if curHandledGear^.Message and gmRemoveFromList <> 0 then 
   212     else
   213         begin
   213         begin
   214         RemoveGearFromList(curHandledGear);
   214         if curHandledGear^.Message and gmRemoveFromList <> 0 then 
   215         // 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
   215             begin
   216         if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear);
   216             RemoveGearFromList(curHandledGear);
   217         curHandledGear^.Message:= curHandledGear^.Message and (not (gmRemoveFromList or gmAddToList))
   217             // 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
   218         end;
   218             if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear);
   219     if curHandledGear^.Active then
   219             curHandledGear^.Message:= curHandledGear^.Message and (not (gmRemoveFromList or gmAddToList))
   220         begin
   220             end;
   221         if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then
   221         if curHandledGear^.Active then
   222             begin
   222             begin
   223             FreeTexture(curHandledGear^.Tex);
   223             if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then
   224             curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall);
   224                 begin
   225             end;
   225                 FreeTexture(curHandledGear^.Tex);
   226         curHandledGear^.doStep(curHandledGear);
   226                 curHandledGear^.Tex:= RenderStringTex(inttostr(curHandledGear^.Timer div 1000), cWhiteColor, fntSmall);
   227         // might be useful later
   227                 end;
   228         //ScriptCall('onGearStep', Gear^.uid);
   228             curHandledGear^.doStep(curHandledGear);
       
   229             // might be useful later
       
   230             //ScriptCall('onGearStep', Gear^.uid);
       
   231             end
   229         end
   232         end
   230     end;
   233     end;
   231 curHandledGear:= nil;
   234 curHandledGear:= nil;
   232 
   235 
   233 if AllInactive then
   236 if AllInactive then