-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactored UrbanExplosion fix to catch HBS error in attackSequence.…
… Transformer and Coolant explosions pass Buildings as targets to an ArtilleryObjectiveSequence, which expects inputs to be AbstractActors. This cases a hidden NRE that was unreported until I started patching it with harmony. This error is now correctly detected and prevented, allowing the attack sequence to finish. This does make them take slightly longer to complete, but should cause less weird errors.
- Loading branch information
Showing
5 changed files
with
99 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using BattleTech; | ||
using Harmony; | ||
|
||
namespace IRTweaks.Patches | ||
{ | ||
// Cleanup known combat state | ||
[HarmonyPatch(typeof(CombatGameState), "OnCombatGameDestroyed")] | ||
static class CombatGameState_OnCombatGameDestroyed | ||
{ | ||
static void Postfix(CombatGameState __instance) | ||
{ | ||
ModState.Reset(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters