hedgewars/GSHandlers.inc
changeset 5480 37bafa5a7016
parent 5474 d5b392e02403
child 5494 5f55e9202122
equal deleted inserted replaced
5478:8005a5ab7117 5480:37bafa5a7016
  4489     
  4489     
  4490     dec(Gear^.Timer);
  4490     dec(Gear^.Timer);
  4491     if Gear^.Timer = 0 then
  4491     if Gear^.Timer = 0 then
  4492         begin
  4492         begin
  4493         dec(Gear^.Health);
  4493         dec(Gear^.Health);
  4494         if (Gear^.Health mod 3) = 0 then
  4494 
  4495             begin
  4495         rx := rndSign(getRandom * _0_1);
  4496             rx := rndSign(getRandom * _0_1);
  4496         ry := rndSign(getRandom * _0_1);
  4497             ry := rndSign(getRandom * _0_1);
  4497         speed := (_3 / Gear^.Tag);
  4498             speed := (_3 / Gear^.Tag);
  4498 
  4499     
  4499         Flake := AddGear(gx, gy, gtFlake, 0, _0, _0, 0);
  4500             Flake := AddGear(gx, gy, gtFlake, 0, _0, _0, 0);
  4500         Flake^.dX:= SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx;
  4501             Flake^.dX:= SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx;
  4501         Flake^.dY:= AngleCos(HHGear^.Angle) * ( - speed) + ry;
  4502             Flake^.dY:= AngleCos(HHGear^.Angle) * ( - speed) + ry;
  4502         Flake^.State := Flake^.State or gsttmpFlag;
  4503             Flake^.State := Flake^.State or gsttmpFlag;
       
  4504             
  4503             
  4505             end;
       
  4506         Gear^.Timer:= Gear^.Tag
  4504         Gear^.Timer:= Gear^.Tag
  4507         end;
  4505         end;
  4508 
  4506 
  4509     if (Gear^.Health = 0) or (HHGear^.Damage <> 0) or ((HHGear^.Message and gmAttack) <> 0) then
  4507     if (Gear^.Health = 0) or (HHGear^.Damage <> 0) or ((HHGear^.Message and gmAttack) <> 0) then
  4510         begin
  4508         begin