hedgewars/uGearsHedgehog.pas
changeset 8562 d9d1cb650ff8
parent 8553 a8e1cff496d8
child 8566 d9627d65edf7
equal deleted inserted replaced
8559:29e420194558 8562:d9d1cb650ff8
   999 var t: PGear;
   999 var t: PGear;
  1000     wasJumping: boolean;
  1000     wasJumping: boolean;
  1001     Hedgehog: PHedgehog;
  1001     Hedgehog: PHedgehog;
  1002 begin
  1002 begin
  1003 Hedgehog:= HHGear^.Hedgehog;
  1003 Hedgehog:= HHGear^.Hedgehog;
  1004 // Some weapons, deagle in particular, wouldn't play so nice in infinite attack mode if hogs were still moving.  Most likely scenario
  1004 //if isInMultiShoot and not AllInactive and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then HHGear^.Message:= HHGear^.Message and not gmAttack;
  1005 // is trying to shoot them twice while rolling.  This is mostly about not wasting ammo, but shouldn't apply to gears not using AmmoShove (portal
  1005 if isInMultiShoot and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then
  1006 // Should we rethink AmmoShove? Presumably we'd need a way of knowing if current gear had already attacked a gear
  1006     begin
  1007 if isInMultiShoot and not AllInactive and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle]) then HHGear^.Message:= HHGear^.Message and not gmAttack;
  1007     AllInactive:= true;
  1008 (*
  1008     HHGear^.Message:= 0
  1009 if isInMultiShoot then
  1009     end
  1010     HHGear^.Message:= 0;
  1010 else AllInactive:= false;
  1011 *)
       
  1012 
       
  1013 (*if ((Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_Utility) <> 0) and isInMultiShoot then 
       
  1014     AllInactive:= true
       
  1015 else if not isInMultiShoot then
       
  1016    AllInactive:= false;*)
       
  1017  AllInactive:= false;
       
  1018 
  1011 
  1019 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
  1012 if (TurnTimeLeft = 0) or (HHGear^.Damage > 0) then
  1020     begin
  1013     begin
  1021     if (Hedgehog^.CurAmmoType = amKnife) then
  1014     if (Hedgehog^.CurAmmoType = amKnife) then
  1022        LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat);
  1015        LoadHedgehogHat(Hedgehog^, Hedgehog^.Hat);
  1129             GHStepTicks:= 95
  1122             GHStepTicks:= 95
  1130         end;
  1123         end;
  1131     exit
  1124     exit
  1132     end;
  1125     end;
  1133 
  1126 
  1134     if Hedgehog^.Gear <> nil then
  1127     if not(isInMultiShoot and (Hedgehog^.CurAmmoType in [amShotgun, amDEagle, amSniperRifle])) and (Hedgehog^.Gear <> nil) then
  1135         begin
  1128         begin
  1136         if GHStepTicks > 0 then
  1129         if GHStepTicks > 0 then
  1137             dec(GHStepTicks);
  1130             dec(GHStepTicks);
  1138         if (GHStepTicks = 0) then
  1131         if (GHStepTicks = 0) then
  1139             HedgehogStep(HHGear)
  1132             HedgehogStep(HHGear)