Solved game freezing issue

My approach with BattleScript_AttackWeakenedByStrongWinds was incorrect and thus caused the game to freeze when Battle Scene is enabled, so I resorted to printing the string directly, which I don't like because there is no pauses between `attackstring` and `STRINGID_ATTACKWEAKENEDBSTRONGWINDS`.
This commit is contained in:
LOuroboros 2021-08-27 18:28:34 -03:00
parent 9e4f33d09e
commit 216d8f0608
3 changed files with 1 additions and 11 deletions

View File

@ -6936,15 +6936,6 @@ BattleScript_DeltaStreamActivates::
waitmessage B_WAIT_TIME_LONG
end3
BattleScript_AttackWeakenedByStrongWinds::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS
waitmessage B_WAIT_TIME_LONG
printstring STRINGID_EMPTYSTRING3
waitmessage 1
goto BattleScript_HitFromAtkAnimation
BattleScript_SnowWarningActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp

View File

@ -375,6 +375,5 @@ extern const u8 BattleScript_PrimordialSeaActivates[];
extern const u8 BattleScript_PrimordialSeaFizzlesOutFireTypeMoves[];
extern const u8 BattleScript_DeltaStreamActivates[];
extern const u8 BattleScript_MysteriousAirCurrentBlowsOn[];
extern const u8 BattleScript_AttackWeakenedByStrongWinds[];
#endif // GUARD_BATTLE_SCRIPTS_H

View File

@ -8147,7 +8147,7 @@ static u16 CalcTypeEffectivenessMultiplierInternal(u16 move, u8 moveType, u8 bat
&& !IsAbilityOnField(ABILITY_CLOUD_NINE))
{
modifier = UQ_4_12(1.0);
gBattlescriptCurrInstr = BattleScript_AttackWeakenedByStrongWinds;
PrepareStringBattle(STRINGID_ATTACKWEAKENEDBSTRONGWINDS, battlerDef);
gBattlescriptCurrInstr++;
}