hedgewars/uGearsHandlersMess.pas
changeset 13285 fd1017c85dd4
parent 13281 36243bd726df
child 13318 9071600f7b22
equal deleted inserted replaced
13284:b504131f7405 13285:fd1017c85dd4
  6318     gi: PGear;
  6318     gi: PGear;
  6319 begin
  6319 begin
  6320 if Gear^.Timer > 0 then dec(Gear^.Timer)
  6320 if Gear^.Timer > 0 then dec(Gear^.Timer)
  6321 else
  6321 else
  6322     begin
  6322     begin
  6323     if Gear^.Pos = posCaseUtility then
       
  6324         a:= GetUtility(Gear^.Hedgehog)
       
  6325     else
       
  6326         a:= GetAmmo(Gear^.Hedgehog);
       
  6327     CheckSum:= CheckSum xor GameTicks;
  6323     CheckSum:= CheckSum xor GameTicks;
  6328     gi := GearsList;
  6324     gi := GearsList;
  6329     while gi <> nil do
  6325     while gi <> nil do
  6330         begin
  6326         begin
  6331         with gi^ do CheckSum:= CheckSum xor X.round xor X.frac xor dX.round xor dX.frac xor Y.round xor Y.frac xor dY.round xor dY.frac;
  6327         with gi^ do CheckSum:= CheckSum xor X.round xor X.frac xor dX.round xor dX.frac xor Y.round xor Y.frac xor dY.round xor dY.frac;
  6332         AddRandomness(CheckSum);
  6328         AddRandomness(CheckSum);
  6333         if (gi^.Kind = gtGenericFaller) and (gi^.Tag = 1) then
  6329         if (gi^.Kind = gtGenericFaller) and (gi^.Tag = 1) then
  6334             gi^.State:= gi^.State and (not gstTmpFlag);
  6330             gi^.State:= gi^.State and (not gstTmpFlag);
  6335         gi := gi^.NextGear
  6331         gi := gi^.NextGear
  6336         end;
  6332         end;
       
  6333     if Gear^.Pos = posCaseUtility then
       
  6334          a:= GetUtility(Gear^.Hedgehog)
       
  6335     else a:= GetAmmo(Gear^.Hedgehog);
  6337     AddPickup(Gear^.Hedgehog^, a, Gear^.Power, hwRound(Gear^.X), hwRound(Gear^.Y));
  6336     AddPickup(Gear^.Hedgehog^, a, Gear^.Power, hwRound(Gear^.X), hwRound(Gear^.Y));
  6338     DeleteGear(Gear)
  6337     DeleteGear(Gear)
  6339     end;
  6338     end;
  6340 end;
  6339 end;
  6341 
  6340