hedgewars/uGears.pas
changeset 13214 9c81e34f1933
parent 13171 9f80c08cdae9
child 13319 78f097923bcb
equal deleted inserted replaced
13213:1ac1f5a91ec0 13214:9c81e34f1933
   235 if stirFallers then
   235 if stirFallers then
   236     begin
   236     begin
   237     t := GearsList;
   237     t := GearsList;
   238     while t <> nil do
   238     while t <> nil do
   239         begin
   239         begin
   240         if t^.Kind = gtGenericFaller then
   240         if (t^.Kind = gtGenericFaller) and (t^.Tag = 1) then
   241             begin
   241             begin
   242             t^.Active:= true;
   242             t^.Active:= true;
   243             t^.X:=  int2hwFloat(GetRandom(rightX-leftX)+leftX);
   243             t^.X:=  int2hwFloat(GetRandom(rightX-leftX)+leftX);
   244             t^.Y:=  int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY);
   244             t^.Y:=  int2hwFloat(GetRandom(LAND_HEIGHT-topY)+topY);
   245             t^.dX:= _90-(GetRandomf*_360);
   245             t^.dX:= _90-(GetRandomf*_360);
   737     begin
   737     begin
   738     rx:= GetRandom(rightX-leftX)+leftX;
   738     rx:= GetRandom(rightX-leftX)+leftX;
   739     ry:= GetRandom(LAND_HEIGHT-topY)+topY;
   739     ry:= GetRandom(LAND_HEIGHT-topY)+topY;
   740     rdx:= _90-(GetRandomf*_360);
   740     rdx:= _90-(GetRandomf*_360);
   741     rdy:= _90-(GetRandomf*_360);
   741     rdy:= _90-(GetRandomf*_360);
   742     AddGear(rx, ry, gtGenericFaller, gstInvisible, rdx, rdy, $FFFFFFFF);
   742     Gear:= AddGear(rx, ry, gtGenericFaller, gstInvisible, rdx, rdy, $FFFFFFFF);
       
   743     // Tag=1: This allows this generic faller to be displaced randomly by events
       
   744     Gear^.Tag:= 1;
   743     end;
   745     end;
   744 
   746 
   745 snowRight:= max(LAND_WIDTH,4096)+512;
   747 snowRight:= max(LAND_WIDTH,4096)+512;
   746 snowLeft:= -(snowRight-LAND_WIDTH);
   748 snowLeft:= -(snowRight-LAND_WIDTH);
   747 
   749