Skip to content

Commit

Permalink
Add BattleForcastFix
Browse files Browse the repository at this point in the history
  • Loading branch information
MokhaLeee committed Dec 15, 2024
1 parent f21a8c3 commit f9a4a70
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Wizardry/Essentials/BattleForcastFix/BattleForcastFix.event
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ifndef BATTLE_FORCAST_FIX_INSTALLED
#define BATTLE_FORCAST_FIX_INSTALLED

/**
* https://feuniverse.us/t/contros-code-collection/13514/15
*/

#include "Source/LynJump.event"
#include "Source/BattleForcastFix.lyn.event"

#endif // BATTLE_FORCAST_FIX_INSTALLED
15 changes: 15 additions & 0 deletions Wizardry/Essentials/BattleForcastFix/Source/BattleForcastFix.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <common-chax.h>

/**
* Called in target-selection on cancel,
* Quite a dangrous bug on vanilla.
*/
LYN_REPLACE_CHECK(sub_8022E38);
void sub_8022E38(void)
{
#if CHAX
ResetText();
#endif

EnsureCameraOntoPosition(NULL, gActiveUnit->xPos, gActiveUnit->yPos);
}
6 changes: 6 additions & 0 deletions Wizardry/Essentials/BattleForcastFix/Source/LynJump.event
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PUSH
ORG $22e38
ALIGN 4
WORD $46C04778 $E59FC000 $E12FFF1C
POIN sub_8022E38
POP
1 change: 1 addition & 0 deletions Wizardry/Wizardry.event
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ALIGN 4
#include "Essentials/RemoveMovePath/RemoveMovePath.event"
#include "Essentials/UnitLimitation/UnitLimitation.event"
#include "Essentials/BanimHpDrainFix/BanimHpDrainFix.event"
#include "Essentials/BattleForcastFix/BattleForcastFix.event"

#include "Common/OverflowDetection/OverflowDetection.lyn.event"
#include "Common/AntiHuffman/AntiHuffman.event"
Expand Down

0 comments on commit f9a4a70

Please sign in to comment.