hedgewars/uGearsUtils.pas
changeset 14221 1bdce164eb72
parent 14217 ab5e710d353d
child 14224 076c9fba3fa8
equal deleted inserted replaced
14220:3c36a4e66c82 14221:1bdce164eb72
  1240                         t^.dX:= t^.dX + Gear^.dX * dmg * _0_01 + SignAs(cHHKick, Gear^.dX);
  1240                         t^.dX:= t^.dX + Gear^.dX * dmg * _0_01 + SignAs(cHHKick, Gear^.dX);
  1241                         t^.dY:= t^.dY + Gear^.dY * dmg * _0_01;
  1241                         t^.dY:= t^.dY + Gear^.dY * dmg * _0_01;
  1242                         t^.State:= t^.State or gstMoving;
  1242                         t^.State:= t^.State or gstMoving;
  1243                         if t^.Kind = gtKnife then t^.State:= t^.State and (not gstCollision);
  1243                         if t^.Kind = gtKnife then t^.State:= t^.State and (not gstCollision);
  1244                         t^.Active:= true;
  1244                         t^.Active:= true;
  1245                         FollowGear:= t
  1245                         FollowGear:= t;
       
  1246 
       
  1247                         if t^.Kind = gtAirmine then
       
  1248                         begin
       
  1249                             t^.Tag:= 1;
       
  1250                             t^.FlightTime:= 5000;
       
  1251                         end
  1246                         end
  1252                         end
  1247                     end;
  1253                     end;
  1248             gtGrave: begin
  1254             gtGrave: begin
  1249                     dmg:= 0;
  1255                     dmg:= 0;
  1250                     r:= Gear^.Radius + t^.Radius;
  1256                     r:= Gear^.Radius + t^.Radius;
  1386                                     dy := -dy;
  1392                                     dy := -dy;
  1387                                 FrameTicks:= 600+random(200);
  1393                                 FrameTicks:= 600+random(200);
  1388                                 State:= ord(sprStar)
  1394                                 State:= ord(sprStar)
  1389                                 end
  1395                                 end
  1390                         end;
  1396                         end;
  1391                 ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg, dsShove)
  1397                 ApplyDamage(Gear, Ammo^.Hedgehog, tmpDmg, dsShove);
       
  1398 
       
  1399                 if Gear^.Kind = gtAirmine then
       
  1400                     begin
       
  1401                         Gear^.Tag:= 1;
       
  1402                         Gear^.FlightTime:= 5000;
       
  1403                     end
  1392                 end
  1404                 end
  1393             else
  1405             else
  1394                 Gear^.State:= Gear^.State or gstWinner;
  1406                 Gear^.State:= Gear^.State or gstWinner;
  1395             if (Gear^.Kind = gtExplosives) and (Ammo^.Kind = gtBlowtorch) then
  1407             if (Gear^.Kind = gtExplosives) and (Ammo^.Kind = gtBlowtorch) then
  1396                 begin
  1408                 begin