hedgewars/uGearsHedgehog.pas
changeset 10789 acbf69e2e5cf
parent 10714 70f71fac37a3
child 10818 f642a28cab0c
equal deleted inserted replaced
10787:50a4cdeedb44 10789:acbf69e2e5cf
   288                 altUse:= false
   288                 altUse:= false
   289                 end;
   289                 end;
   290 
   290 
   291             case CurAmmoType of
   291             case CurAmmoType of
   292                       amGrenade: newGear:= AddGear(hwRound(lx), hwRound(ly), gtGrenade,         0, newDx, newDy, CurWeapon^.Timer);
   292                       amGrenade: newGear:= AddGear(hwRound(lx), hwRound(ly), gtGrenade,         0, newDx, newDy, CurWeapon^.Timer);
       
   293                       amAirMine: newGear:= AddGear(hwRound(lx), hwRound(ly), gtAirMine,         0, newDx, newDy, 0);
   293                       amMolotov: newGear:= AddGear(hwRound(lx), hwRound(ly), gtMolotov,      0, newDx, newDy, 0);
   294                       amMolotov: newGear:= AddGear(hwRound(lx), hwRound(ly), gtMolotov,      0, newDx, newDy, 0);
   294                   amClusterBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb,  0, newDx, newDy, CurWeapon^.Timer);
   295                   amClusterBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb,  0, newDx, newDy, CurWeapon^.Timer);
   295                       amGasBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb,      0, newDx, newDy, CurWeapon^.Timer);
   296                       amGasBomb: newGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb,      0, newDx, newDy, CurWeapon^.Timer);
   296                       amBazooka: newGear:= AddGear(hwRound(lx), hwRound(ly), gtShell,        0, newDx, newDy, 0);
   297                       amBazooka: newGear:= AddGear(hwRound(lx), hwRound(ly), gtShell,        0, newDx, newDy, 0);
   297                      amSnowball: newGear:= AddGear(hwRound(lx), hwRound(ly), gtSnowball,     0, newDx, newDy, 0);
   298                      amSnowball: newGear:= AddGear(hwRound(lx), hwRound(ly), gtSnowball,     0, newDx, newDy, 0);
   423                      amGrenade, amMolotov,
   424                      amGrenade, amMolotov,
   424                  amClusterBomb, amGasBomb,
   425                  amClusterBomb, amGasBomb,
   425                      amBazooka, amSnowball,
   426                      amBazooka, amSnowball,
   426                          amBee, amSMine,
   427                          amBee, amSMine,
   427                       amMortar, amWatermelon,
   428                       amMortar, amWatermelon,
   428                  amHellishBomb, amDrill: FollowGear:= newGear;
   429                  amHellishBomb, amDrill,
       
   430                      amAirMine: FollowGear:= newGear;
   429 
   431 
   430                      amShotgun, amPickHammer,
   432                      amShotgun, amPickHammer,
   431                         amRope, amDEagle,
   433                         amRope, amDEagle,
   432                      amSineGun, amSniperRifle,
   434                      amSineGun, amSniperRifle,
   433                    amFirePunch, amWhip,
   435                    amFirePunch, amWhip,
   441                 amFlamethrower, amLandGun,
   443                 amFlamethrower, amLandGun,
   442                  amResurrector, //amStructure,
   444                  amResurrector, //amStructure,
   443                       amTardis, amPiano,
   445                       amTardis, amPiano,
   444                       amIceGun, amRubber: CurAmmoGear:= newGear;
   446                       amIceGun, amRubber: CurAmmoGear:= newGear;
   445             end;
   447             end;
   446 	    if CurAmmoType = amCake then FollowGear:= newGear;
   448             if CurAmmoType = amCake then FollowGear:= newGear;
   447 
   449             if CurAmmoType = amAirMine then newGear^.Hedgehog:= nil;
   448             if ((CurAmmoType = amMine) or (CurAmmoType = amSMine)) and (GameFlags and gfInfAttack <> 0) then
   450 
       
   451             if ((CurAmmoType = amMine) or (CurAmmoType = amSMine) or (CurAmmoType = amAirMine)) and (GameFlags and gfInfAttack <> 0) then
   449                 newGear^.FlightTime:= GameTicks + 1000
   452                 newGear^.FlightTime:= GameTicks + 1000
   450             else if CurAmmoType = amDrill then
   453             else if CurAmmoType = amDrill then
   451                 newGear^.FlightTime:= GameTicks + 250;
   454                 newGear^.FlightTime:= GameTicks + 250;
   452             if Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then
   455             if Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then
   453                 begin
   456                 begin