hedgewars/GSHandlers.inc
changeset 2713 71250942e95b
parent 2647 0e1208e92dfe
child 2726 a84fc5113d01
equal deleted inserted replaced
2712:8f4527c9137c 2713:71250942e95b
  1380                 begin
  1380                 begin
  1381                 Gear^.Radius:= 9;
  1381                 Gear^.Radius:= 9;
  1382                 AmmoShove(Gear, 4, 100);
  1382                 AmmoShove(Gear, 4, 100);
  1383                 Gear^.Radius:= 1;
  1383                 Gear^.Radius:= 1;
  1384                 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 4, EXPLNoDamage);
  1384                 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 4, EXPLNoDamage);
       
  1385                 if Random(100) > 90 then
       
  1386                   for i:= 0 to Random(3) do
       
  1387                     AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), hwRound(Gear^.Y) - 2, vgtSmoke);
  1385                 if Gear^.Health > 0 then dec(Gear^.Health);
  1388                 if Gear^.Health > 0 then dec(Gear^.Health);
  1386                 Gear^.Timer:= 450 - Gear^.Tag * 8
  1389                 Gear^.Timer:= 450 - Gear^.Tag * 8
  1387                 end
  1390                 end
  1388                 else begin
  1391                 else begin
  1389 // Modified fire
  1392 // Modified fire
  1390                 if ((GameTicks and $7FF) = 0) and ((GameFlags and gfSolidLand) = 0) then
  1393                 if ((GameTicks and $7FF) = 0) and ((GameFlags and gfSolidLand) = 0) then begin
  1391                     DrawExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 4);
  1394                     DrawExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 4);
       
  1395                     
       
  1396                     for i:= 0 to Random(3) do
       
  1397                       AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), hwRound(Gear^.Y) - 2, vgtSmoke);
       
  1398                 end;
  1392                 // This one is interesting.  I think I understand the purpose, but I wonder if a bit more fuzzy of kicking could be done with getrandom.
  1399                 // This one is interesting.  I think I understand the purpose, but I wonder if a bit more fuzzy of kicking could be done with getrandom.
  1393         	    Gear^.Timer:= 100 - Gear^.Tag * 3;
  1400         	    Gear^.Timer:= 100 - Gear^.Tag * 3;
  1394                 if (Gear^.Damage > 3000+Gear^.Tag*1500) then Gear^.Health:= 0
  1401                 if (Gear^.Damage > 3000+Gear^.Tag*1500) then Gear^.Health:= 0
  1395                 end
  1402                 end
  1396             end
  1403             end
  1397         end;
  1404         end;
  1398 if Gear^.Health = 0 then
  1405 if Gear^.Health = 0 then begin
  1399 	DeleteGear(Gear)
  1406   if (Gear^.State and gsttmpFlag) = 0 then begin
       
  1407     if Random(100) > 80 then begin
       
  1408       for i:= 0 to Random(3) do begin
       
  1409         AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), hwRound(Gear^.Y) - 2, vgtSmoke);
       
  1410       end;
       
  1411     end;
       
  1412   end else begin
       
  1413     for i:= 0 to Random(3) do begin
       
  1414       AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), hwRound(Gear^.Y) - 2, vgtSmoke);
       
  1415     end;
       
  1416   end;
       
  1417   
       
  1418   DeleteGear(Gear)
       
  1419   end;
  1400 end;
  1420 end;
  1401 
  1421 
  1402 ////////////////////////////////////////////////////////////////////////////////
  1422 ////////////////////////////////////////////////////////////////////////////////
  1403 procedure doStepFirePunchWork(Gear: PGear);
  1423 procedure doStepFirePunchWork(Gear: PGear);
  1404 var HHGear: PGear;
  1424 var HHGear: PGear;