hedgewars/GSHandlers.inc
changeset 5695 f1015857deb8
parent 5693 24a93bbdb81a
child 5706 4454aa0523e7
equal deleted inserted replaced
5694:10501c327907 5695:f1015857deb8
   584     move, draw, allpx, gun: Boolean;
   584     move, draw, allpx, gun: Boolean;
   585     s: PSDL_Surface;
   585     s: PSDL_Surface;
   586     p: PLongwordArray;
   586     p: PLongwordArray;
   587     lf: LongWord;
   587     lf: LongWord;
   588 begin
   588 begin
       
   589 inc(Gear^.Pos);
   589 gun:= (Gear^.State and gstTmpFlag) <> 0;
   590 gun:= (Gear^.State and gstTmpFlag) <> 0;
   590 move:= false;
   591 move:= false;
   591 draw:= false;
   592 draw:= false;
   592 if gun then
   593 if gun then
   593     begin
   594     begin
   664 if draw then 
   665 if draw then 
   665     with Gear^ do
   666     with Gear^ do
   666         begin
   667         begin
   667         // we've collided with land. draw some stuff and get back into the clouds
   668         // we've collided with land. draw some stuff and get back into the clouds
   668         move:= true;
   669         move:= true;
   669         if (GameTicks > 20) and ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtRope)) then
   670         if (Pos > 20) and ((CurAmmoGear = nil) or (CurAmmoGear^.Kind <> gtRope)) then
   670             begin
   671             begin
   671 ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS ////////////////////////////////////
   672 ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS ////////////////////////////////////
   672             if not gun then
   673             if not gun then
   673                 begin
   674                 begin
   674                 dec(yy,3);
   675                 dec(yy,3);
   728     if gun then
   729     if gun then
   729         begin
   730         begin
   730         DeleteGear(Gear);
   731         DeleteGear(Gear);
   731         exit
   732         exit
   732         end;
   733         end;
       
   734     Gear^.Pos:= 0;
   733     Gear^.X:= int2hwFloat(GetRandom(LAND_WIDTH+1024)-512);
   735     Gear^.X:= int2hwFloat(GetRandom(LAND_WIDTH+1024)-512);
   734     Gear^.Y:= int2hwFloat(750+(GetRandom(50)-25));
   736     Gear^.Y:= int2hwFloat(750+(GetRandom(50)-25));
   735     Gear^.State:= Gear^.State or gstInvisible;
   737     Gear^.State:= Gear^.State or gstInvisible;
   736     end
   738     end
   737 end;
   739 end;