It seems there's no need to copy gear's msg. Fixes bots getting stuck after hog switch.
authorunc0rr
Wed, 28 Dec 2011 18:40:02 +0300
changeset 6535 51a7e71ad317
parent 6534 e6cb8a41b5f4
child 6536 8a096836321c
It seems there's no need to copy gear's msg. Fixes bots getting stuck after hog switch.
hedgewars/GSHandlers.inc
hedgewars/uAIActions.pas
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/FrontendDataUtils.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/GameMode.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Grave.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Map.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Scheme.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Team.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Datastructures/Weapon.java
project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/UserInput/TouchInterface.java
share/hedgewars/Data/Scripts/plist/Racer.plist
--- 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}           '',