hedgewars/uGearsHedgehog.pas
changeset 13752 52959f686082
parent 13741 2ac3658a2a13
child 13758 885404cdf07a
equal deleted inserted replaced
13751:1a26c472f5ef 13752:52959f686082
   636             OnUsedAmmo(CurrentHedgehog^);
   636             OnUsedAmmo(CurrentHedgehog^);
   637             if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) and (((GameFlags and gfInfAttack) = 0) or PlacingHogs) then
   637             if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) and (((GameFlags and gfInfAttack) = 0) or PlacingHogs) then
   638                 begin
   638                 begin
   639                 if TagTurnTimeLeft = 0 then
   639                 if TagTurnTimeLeft = 0 then
   640                     TagTurnTimeLeft:= TurnTimeLeft;
   640                     TagTurnTimeLeft:= TurnTimeLeft;
   641                 if (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0) and CheckCoordInWater(hwRound(CurAmmoGear^.X), hwRound(CurAmmoGear^.Y)) then
   641                 if (HHGear^.State and gstHHDriven) <> 0 then
   642                      TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 25
   642                     begin
   643                 else TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 100;
   643                     if (CurAmmoGear <> nil) and (CurAmmoGear^.State and gstSubmersible <> 0) and CheckCoordInWater(hwRound(CurAmmoGear^.X), hwRound(CurAmmoGear^.Y)) then
   644                 IsGetAwayTime := true;
   644                          TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 25
       
   645                     else TurnTimeLeft:=(Ammoz[a].TimeAfterTurn * cGetAwayTime) div 100;
       
   646                     IsGetAwayTime := true;
       
   647                     end;
   645                 end;
   648                 end;
   646             if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) and (HHGear <> nil) then
   649             if ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) = 0) and (HHGear <> nil) then
   647                 HHGear^.State:= HHGear^.State or gstAttacked;
   650                 HHGear^.State:= HHGear^.State or gstAttacked;
   648             if (a = amNothing) or ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) or
   651             if (a = amNothing) or ((Ammoz[a].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) or
   649                (((GameFlags and gfInfAttack) <> 0) and ((Ammoz[a].Ammo.Propz and ammoprop_ForceTurnEnd) = 0)) then
   652                (((GameFlags and gfInfAttack) <> 0) and ((Ammoz[a].Ammo.Propz and ammoprop_ForceTurnEnd) = 0)) then