hedgewars/uGearsHandlersMess.pas
changeset 11469 26068971a4de
parent 11468 2f6f8baa2a97
child 11475 1d478892cf1c
equal deleted inserted replaced
11468:2f6f8baa2a97 11469:26068971a4de
  2167         dec(Gear^.Health, Gear^.Damage);
  2167         dec(Gear^.Health, Gear^.Damage);
  2168         Gear^.Damage := 0;
  2168         Gear^.Damage := 0;
  2169         end
  2169         end
  2170     else
  2170     else
  2171         begin
  2171         begin
  2172         if (Gear^.Pos <> posCaseHealth) and (GameTicks and $1FFF = 0) then // stir 'em up periodically
       
  2173             begin
       
  2174             gi := GearsList;
       
  2175             while gi <> nil do
       
  2176                 begin
       
  2177                 if gi^.Kind = gtGenericFaller then
       
  2178                     begin
       
  2179                     gi^.Active:= true;
       
  2180                     gi^.X:=  int2hwFloat(GetRandom(rightX-leftX)+leftX);
       
  2181                     gi^.Y:=  int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY);
       
  2182                     gi^.dX:= _90-(GetRandomf*_360);
       
  2183                     gi^.dY:= _90-(GetRandomf*_360)
       
  2184                     end;
       
  2185                 gi := gi^.NextGear
       
  2186                 end
       
  2187             end;
       
  2188 
       
  2189         if Gear^.Timer = 500 then
  2172         if Gear^.Timer = 500 then
  2190             begin
  2173             begin
  2191 (* Can't make sparkles team coloured without working out what the next team is going to be. This should be solved, really, since it also screws up
  2174 (* Can't make sparkles team coloured without working out what the next team is going to be. This should be solved, really, since it also screws up
  2192    voices. Reinforcements voices is heard for active team, not team-to-be.  Either that or change crate spawn from end of turn to start, although that
  2175    voices. Reinforcements voices is heard for active team, not team-to-be.  Either that or change crate spawn from end of turn to start, although that
  2193    has its own complexities. *)
  2176    has its own complexities. *)