hedgewars/uGearsHedgehog.pas
changeset 8494 53b91a602955
parent 8493 1a84f8b08ca7
child 8553 a8e1cff496d8
child 8557 18330b24b92c
equal deleted inserted replaced
8493:1a84f8b08ca7 8494:53b91a602955
   277                          amMine: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtMine, gstWait, SignAs(_0_02, dX), _0, 3000);
   277                          amMine: newGear:= AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtMine, gstWait, SignAs(_0_02, dX), _0, 3000);
   278                         amSMine: newGear:= AddGear(hwRound(lx), hwRound(ly), gtSMine,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
   278                         amSMine: newGear:= AddGear(hwRound(lx), hwRound(ly), gtSMine,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
   279                         amKnife: begin 
   279                         amKnife: begin 
   280                                  newGear:= AddGear(hwRound(lx), hwRound(ly), gtKnife,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
   280                                  newGear:= AddGear(hwRound(lx), hwRound(ly), gtKnife,    0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0);
   281                                  newGear^.State:= newGear^.State or gstMoving; 
   281                                  newGear^.State:= newGear^.State or gstMoving; 
   282                                  newGear^.Radius:= 6 // temporarily shrink so it doesn't instantly embed in the ground
   282                                  newGear^.Radius:= 4 // temporarily shrink so it doesn't instantly embed in the ground
   283                                  end;
   283                                  end;
   284                        amDEagle: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0);
   284                        amDEagle: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0);
   285                       amSineGun: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSineGunShot, 0, xx * _0_5, yy * _0_5, 0);
   285                       amSineGun: newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSineGunShot, 0, xx * _0_5, yy * _0_5, 0);
   286                     amPortalGun: begin
   286                     amPortalGun: begin
   287                                  newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtPortal, 0, xx * _0_6, yy * _0_6, 
   287                                  newGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtPortal, 0, xx * _0_6, yy * _0_6, 
  1013    AllInactive:= false;*)
  1013    AllInactive:= false;*)
  1014  AllInactive:= false;
  1014  AllInactive:= false;
  1015 
  1015 
  1016 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
  1016 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
  1017     begin
  1017     begin
       
  1018     if (Hedgehog^.CurAmmoType = amKnife) then
       
  1019        LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat);
  1018     if TagTurnTimeLeft = 0 then
  1020     if TagTurnTimeLeft = 0 then
  1019         TagTurnTimeLeft:= TurnTimeLeft;
  1021         TagTurnTimeLeft:= TurnTimeLeft;
  1020     TurnTimeLeft:= 0;
  1022     TurnTimeLeft:= 0;
  1021     isCursorVisible:= false;
  1023     isCursorVisible:= false;
  1022     HHGear^.State:= HHGear^.State and (not (gstHHDriven or gstAnimation or gstAttacking));
  1024     HHGear^.State:= HHGear^.State and (not (gstHHDriven or gstAnimation or gstAttacking));