From 25459073e541926839dfde16c7f0eb0216f6afdd Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 14 Sep 2023 11:44:44 +0200 Subject: [PATCH] ai lag fixes ready --- data/scripts/debug.inc | 1 - include/battle.h | 2 +- include/config/debug.h | 2 +- src/battle_util.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index 8e09deb5e..64b7e1dd0 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -70,7 +70,6 @@ Debug_BoxFilledMessage_Text: .string "Storage boxes filled!$" Debug_Script_1:: - multi_fixed_2_vs_2 TRAINER_WALLACE, NULL, TRAINER_JUAN_5, NULL, TRAINER_STEVEN, TRAINER_BACK_PIC_STEVEN end Debug_Script_2:: diff --git a/include/battle.h b/include/battle.h index a906d75cd..5f665ad9e 100644 --- a/include/battle.h +++ b/include/battle.h @@ -294,7 +294,7 @@ struct AiLogicData u8 moveLimitations[MAX_BATTLERS_COUNT]; bool8 shouldSwitchMon; // Because all available moves have no/little effect. Each bit per battler. u8 monToSwitchId[MAX_BATTLERS_COUNT]; // ID of the mon to switch. - bool8 weatherHasEffect; // WEATHER_HAS_EFFECT, so it doesn't have to be used all the time + bool8 weatherHasEffect; // The same as WEATHER_HAS_EFFECT. Stored here, so it's called only once. }; struct AI_ThinkingStruct diff --git a/include/config/debug.h b/include/config/debug.h index ff54f6ac1..eea676b30 100644 --- a/include/config/debug.h +++ b/include/config/debug.h @@ -9,7 +9,7 @@ // Battle Debug Menu #define DEBUG_BATTLE_MENU TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. -#define DEBUG_AI_DELAY_TIMER TRUE // If set to TRUE, displays the number of frames it takes for the AI to choose a move. Replaces the "What will PKMN do" text. Useful for devs or anyone who modifies the AI code and wants to see if it doesn't take too long to run. +#define DEBUG_AI_DELAY_TIMER FALSE // If set to TRUE, displays the number of frames it takes for the AI to choose a move. Replaces the "What will PKMN do" text. Useful for devs or anyone who modifies the AI code and wants to see if it doesn't take too long to run. // Pokémon Debug #define DEBUG_POKEMON_MENU TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen. diff --git a/src/battle_util.c b/src/battle_util.c index d0bcb6379..480b053ea 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -4034,7 +4034,7 @@ static bool32 TryChangeBattleTerrain(u32 battler, u32 statusFlag, u8 *timer) static void ForewarnChooseMove(u32 battler) { struct Forewarn { - u32 battler; + u8 battler; u8 power; u16 moveId; };