It seems there's no need to copy gear's msg. Fixes bots getting stuck after hog switch.
--- a/hedgewars/GSHandlers.inc Tue Dec 27 14:14:26 2011 -0500
+++ b/hedgewars/GSHandlers.inc Wed Dec 28 18:40:02 2011 +0300
@@ -2620,13 +2620,13 @@
if ((Gear^.Message and (not gmSwitch)) <> 0) or (TurnTimeLeft = 0) then
begin
HHGear := Gear^.Hedgehog^.Gear;
- Msg := Gear^.Message and (not gmSwitch);
+ //Msg := Gear^.Message and (not gmSwitch);
DeleteGear(Gear);
ApplyAmmoChanges(HHGear^.Hedgehog^);
HHGear := CurrentHedgehog^.Gear;
ApplyAmmoChanges(HHGear^.Hedgehog^);
- HHGear^.Message := Msg;
+ //HHGear^.Message := Msg;
exit
end;
--- a/hedgewars/uAIActions.pas Tue Dec 27 14:14:26 2011 -0500
+++ b/hedgewars/uAIActions.pas Wed Dec 28 18:40:02 2011 +0300
@@ -64,7 +64,7 @@
procedure ProcessAction(var Actions: TActions; Me: PGear);
implementation
-uses uAIMisc, uAI, uAmmos, uVariables, uCommands, uUtils, uDebug, uIO;
+uses uAIMisc, uAI, uAmmos, uVariables, uCommands, uUtils, uDebug, uIO{$IFDEF TRACEAIACTIONS}, uConsole{$ENDIF};
const ActionIdToStr: array[0..7] of string[16] = (
{aia_none} '',