hedgewars/HHHandlers.inc
changeset 931 ab4d98858a40
parent 930 3f61bd3b08fd
child 941 b5222ddafe1f
equal deleted inserted replaced
930:3f61bd3b08fd 931:ab4d98858a40
   474 	if (((Gear^.Message and gm_Attack) <> 0)
   474 	if (((Gear^.Message and gm_Attack) <> 0)
   475 		or ((Gear^.State and gstAttacking) <> 0)) then
   475 		or ((Gear^.State and gstAttacking) <> 0)) then
   476 		Attack(Gear) // should be before others to avoid desync with '/put' msg and changing weapon msgs
   476 		Attack(Gear) // should be before others to avoid desync with '/put' msg and changing weapon msgs
   477 	else
   477 	else
   478 else with PHedgehog(Gear^.Hedgehog)^ do
   478 else with PHedgehog(Gear^.Hedgehog)^ do
   479 	 if ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0)
   479 	 if ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0) 
   480 		and ((Gear^.Message and gm_LJump) <> 0)
   480 		and ((Gear^.Message and gm_LJump) <> 0)
   481 		and (((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_AltUse) <> 0) then Attack(Gear);
   481 		and (((Ammo^[CurSlot, CurAmmo].Propz) and ammoprop_AltUse) <> 0) then
       
   482 		begin
       
   483 		Gear^.Message:= Gear^.Message and not gm_LJump;
       
   484 		Attack(Gear)
       
   485 		end;
   482 
   486 
   483 if (CurAmmoGear = nil)
   487 if (CurAmmoGear = nil)
   484 	or ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0) then
   488 	or ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0) then
   485 	begin
   489 	begin
   486 	if ((Gear^.Message and gm_Slot) <> 0) then ChangeAmmo(Gear);
   490 	if ((Gear^.Message and gm_Slot) <> 0) then ChangeAmmo(Gear);