hedgewars/uGears.pas
changeset 7426 55b49cc1f33a
parent 7412 9e5aa3c8dc62
child 7477 26706bf32ecf
equal deleted inserted replaced
7423:ec8f690f3e0f 7426:55b49cc1f33a
   209     if curHandledGear^.Message and gmRemoveFromList <> 0 then 
   209     if curHandledGear^.Message and gmRemoveFromList <> 0 then 
   210         begin
   210         begin
   211         RemoveGearFromList(curHandledGear);
   211         RemoveGearFromList(curHandledGear);
   212         // 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
   212         // 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
   213         if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear);
   213         if curHandledGear^.Message and gmAddToList <> 0 then InsertGearToList(curHandledGear);
   214         curHandledGear^.Message:= curHandledGear^.Message and not (gmRemoveFromList or gmAddToList)
   214         curHandledGear^.Message:= curHandledGear^.Message and (not (gmRemoveFromList or gmAddToList))
   215         end;
   215         end;
   216     if curHandledGear^.Active then
   216     if curHandledGear^.Active then
   217         begin
   217         begin
   218         if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then
   218         if curHandledGear^.RenderTimer and (curHandledGear^.Timer > 500) and ((curHandledGear^.Timer mod 1000) = 0) then
   219             begin
   219             begin
   632 if (GameFlags and gfLaserSight) <> 0 then
   632 if (GameFlags and gfLaserSight) <> 0 then
   633     cLaserSighting:= true;
   633     cLaserSighting:= true;
   634 
   634 
   635 if (GameFlags and gfArtillery) <> 0 then
   635 if (GameFlags and gfArtillery) <> 0 then
   636     cArtillery:= true;
   636     cArtillery:= true;
   637 
   637 for i:= GetRandom(10)+30 downto 0 do
   638 for i:= 0 to GetRandom(10)+30 do
       
   639     begin                                                                                                                                       rx:= GetRandom(rightX-leftX)+leftX;
   638     begin                                                                                                                                       rx:= GetRandom(rightX-leftX)+leftX;
   640     ry:= GetRandom(LAND_HEIGHT-topY)+topY;
   639     ry:= GetRandom(LAND_HEIGHT-topY)+topY;
   641     rdx:= _90-(GetRandomf*_360);
   640     rdx:= _90-(GetRandomf*_360);
   642     rdy:= _90-(GetRandomf*_360);
   641     rdy:= _90-(GetRandomf*_360);
   643     AddGear(rx, ry, gtGenericFaller, gstInvisible, rdx, rdy, $FFFFFFFF);
   642     AddGear(rx, ry, gtGenericFaller, gstInvisible, rdx, rdy, $FFFFFFFF);