# HG changeset patch # User nemo # Date 1288997772 14400 # Node ID 1563b216f24350b445f9a662f97241cae8c7485b # Parent fd51e122c63e248c3ed0df7077b44e3b5164fba0 revert attempts to block switching weapon while targetting in infinite attack mode. just getting too messy. probably best to allow any weapon to be targetted, and store the target in the gear and draw it there instead of uworld, but I'm leaving this alone diff -r fd51e122c63e -r 1563b216f243 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Fri Nov 05 18:10:05 2010 -0400 +++ b/hedgewars/HHHandlers.inc Fri Nov 05 18:56:12 2010 -0400 @@ -53,7 +53,7 @@ Gear^.Message:= Gear^.Message and not gmSlot; ammoidx:= 0; if ((Gear^.State and (gstAttacking or gstAttacked)) <> 0) or - ((CurAmmoGear <> nil) and ((Ammoz[CurAmmoGear^.AmmoType].Ammo.Propz and ammoprop_NeedTarget) <> 0) and (TargetPoint.X <> NoPointX)) or + (TargetPoint.X <> NoPointX) or ((MultiShootAttacks > 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEndHint) = 0)) or ((Gear^.State and gstHHDriven) = 0) then exit; ChangeAmmo:= true; @@ -188,10 +188,7 @@ amClusterBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, CurWeapon^.Timer); amGasBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, CurWeapon^.Timer); amBazooka: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtAmmo_Grenade, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); - amBee: begin - FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtBee, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); - CurAmmoGear:= FollowGear - end; + amBee: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtBee, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); amShotgun: begin PlaySound(sndShotgunReload); CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtShotgunShot, 0, xx * _0_5, yy * _0_5, 0); @@ -227,8 +224,8 @@ PlaySound(sndParachute) end; // we save CurWeapon^.Pos (in this case: cursor direction) by using it as (otherwise irrelevant) X value of the new gear. - amAirAttack: CurAmmoGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 0, _0, _0, 0); - amMineStrike: CurAmmoGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 1, _0, _0, 0); + amAirAttack: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 0, _0, _0, 0); + amMineStrike: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 1, _0, _0, 0); amBlowTorch: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtBlowTorch, 0, SignAs(_0_5, dX), _0, 0); amGirder: CurAmmoGear:= AddGear(0, 0, gtGirder, CurWeapon^.Pos, _0, _0, 0); amTeleport: CurAmmoGear:= AddGear(CurWeapon^.Pos, 0, gtTeleport, 0, _0, _0, 0); @@ -246,7 +243,7 @@ amSeduction: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius * 2), hwRound(ly + yy * cHHRadius * 2), gtSeduction, 0, xx * _0_4, yy * _0_4, 0); amWatermelon: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtWatermelon, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, CurWeapon^.Timer); amHellishBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtHellishBomb, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); - amNapalm: CurAmmoGear:= AddGear(CurWeapon^.Pos, 0, gtAirAttack, 2, _0, _0, 0); + amNapalm: AddGear(CurWeapon^.Pos, 0, gtAirAttack, 2, _0, _0, 0); amDrill: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtDrill, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); amBallgun: CurAmmoGear:= AddGear(hwRound(X), hwRound(Y), gtBallgun, 0, xx * _0_5, yy * _0_5, 0); amJetpack: CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtJetpack, 0, _0, _0, 0); @@ -298,7 +295,6 @@ Power:= 0; if (CurAmmoGear <> nil) - and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget) = 0) and ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) = 0){check for dropping ammo from rope} then begin CurAmmoGear^.AmmoType:= CurAmmoType;