hedgewars/uGears.pas
changeset 7755 b8958e64e68d
parent 7754 e81dc9bef8b8
child 7761 6dc1be8ff73e
equal deleted inserted replaced
7754:e81dc9bef8b8 7755:b8958e64e68d
   669     begin
   669     begin
   670     case t^.Kind of
   670     case t^.Kind of
   671         gtHedgehog,
   671         gtHedgehog,
   672             gtMine,
   672             gtMine,
   673             gtSMine,
   673             gtSMine,
       
   674             gtKnife,
   674             gtCase,
   675             gtCase,
   675             gtTarget,
   676             gtTarget,
   676             gtExplosives,
   677             gtExplosives,
   677             gtStructure: begin
   678             gtStructure: begin
   678 //addFileLog('ShotgunShot radius: ' + inttostr(Gear^.Radius) + ', t^.Radius = ' + inttostr(t^.Radius) + ', distance = ' + inttostr(dist) + ', dmg = ' + inttostr(dmg));
   679 //addFileLog('ShotgunShot radius: ' + inttostr(Gear^.Radius) + ', t^.Radius = ' + inttostr(t^.Radius) + ', distance = ' + inttostr(dist) + ', dmg = ' + inttostr(dmg));
   696 
   697 
   697                         DeleteCI(t);
   698                         DeleteCI(t);
   698                         t^.dX:= t^.dX + Gear^.dX * dmg * _0_01 + SignAs(cHHKick, Gear^.dX);
   699                         t^.dX:= t^.dX + Gear^.dX * dmg * _0_01 + SignAs(cHHKick, Gear^.dX);
   699                         t^.dY:= t^.dY + Gear^.dY * dmg * _0_01;
   700                         t^.dY:= t^.dY + Gear^.dY * dmg * _0_01;
   700                         t^.State:= t^.State or gstMoving;
   701                         t^.State:= t^.State or gstMoving;
       
   702                         if t^.Kind = gtKnife then t^.State:= t^.State and not gstCollision;
   701                         t^.Active:= true;
   703                         t^.Active:= true;
   702                         FollowGear:= t
   704                         FollowGear:= t
   703                         end
   705                         end
   704                     end;
   706                     end;
   705             gtGrave: begin
   707             gtGrave: begin