hedgewars/uGearsUtils.pas
changeset 10654 cdce07f5a011
parent 10653 ae9ad7735690
child 10659 79e466c393f7
equal deleted inserted replaced
10653:ae9ad7735690 10654:cdce07f5a011
   100     dmgRadius:= Radius shl 1
   100     dmgRadius:= Radius shl 1
   101 else
   101 else
   102     dmgRadius:= Radius;
   102     dmgRadius:= Radius;
   103 dmgBase:= dmgRadius + cHHRadius div 2;*)
   103 dmgBase:= dmgRadius + cHHRadius div 2;*)
   104 dmgBase:= Radius shl 1 + cHHRadius div 2;
   104 dmgBase:= Radius shl 1 + cHHRadius div 2;
       
   105 
       
   106 // we might have to run twice if weWrap is enabled
       
   107 wrap:= false;
       
   108 repeat;
       
   109 
   105 fX:= int2hwFloat(X);
   110 fX:= int2hwFloat(X);
   106 fY:= int2hwFloat(Y);
   111 fY:= int2hwFloat(Y);
   107 Gear:= GearsList;
   112 Gear:= GearsList;
   108 
       
   109 // we might have to run twice if weWrap is enabled
       
   110 wrap:= false;
       
   111 repeat;
       
   112 
   113 
   113 while Gear <> nil do
   114 while Gear <> nil do
   114     begin
   115     begin
   115     dmg:= 0;
   116     dmg:= 0;
   116     //dmg:= dmgRadius  + cHHRadius div 2 - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y)));
   117     //dmg:= dmgRadius  + cHHRadius div 2 - hwRound(Distance(Gear^.X - int2hwFloat(X), Gear^.Y - int2hwFloat(Y)));