--- a/hedgewars/uTouch.pas Sun Apr 29 18:08:46 2012 +0200
+++ b/hedgewars/uTouch.pas Sun Apr 29 21:05:09 2012 +0200
@@ -265,12 +265,15 @@
ParseTeamCommand('-attack');
if widget = @utilityWidget then
- if (CurrentHedgehog <> nil) and
- (Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0)then
- begin
- ParseTeamCommand('put');
- targetted:= true;
- end;
+ if (CurrentHedgehog <> nil)then
+ if(Ammoz[CurrentHedgehog^.CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0)then
+ begin
+ ParseTeamCommand('put');
+ targetted:= true;
+ end
+ else if CurAmmoGear^.AmmoType = amSwitch then
+ ParseTeamCommand('switch')
+ else WriteLnToConsole(inttostr(ord(Ammoz[CurrentHedgehog^.CurAmmoType].NameId)) + ' ' + inttostr(ord(sidSwitch)));
end;
if targetting then
--- a/hedgewars/uWorld.pas Sun Apr 29 18:08:46 2012 +0200
+++ b/hedgewars/uWorld.pas Sun Apr 29 21:05:09 2012 +0200
@@ -1765,6 +1765,11 @@
utilityWidget.sprite:= sprTargetButton;
animateWidget(@utilityWidget, true, true);
end
+ else if ammoType = amSwitch then
+ begin
+ utilityWidget.sprite:= sprTargetButton;
+ animateWidget(@utilityWidget, true, true);
+ end
else if utilityWidget.show then
animateWidget(@utilityWidget, true, false);
end;