-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ParentDestructionMission & ParentDetachmentMission "Fixed" chronowarping children Add children skip for ChronoWarp Rewritten and fixed a hook Loop over attachment AI separately from other AI routines
- Loading branch information
1 parent
3eb18e7
commit cf33e39
Showing
16 changed files
with
799 additions
and
7 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
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,102 @@ | ||
#include "Body.h" | ||
|
||
#include <Ext/TechnoType/Body.h> | ||
|
||
DEFINE_HOOK(0x4DA86E, FootClass_AI_UpdateAttachedLocomotion, 0x0) | ||
{ | ||
GET(FootClass* const, pThis, ESI); | ||
auto const pExt = TechnoExt::ExtMap.Find(pThis); | ||
|
||
if (!pExt->ParentAttachment) | ||
pThis->Locomotor->Process(); | ||
|
||
return 0x4DA87A; | ||
} | ||
|
||
DEFINE_HOOK(0x710460, TechnoClass_Destroy_HandleAttachments, 0x6) | ||
{ | ||
GET(TechnoClass*, pThis, ECX); | ||
|
||
TechnoExt::HandleHostDestruction(pThis); | ||
|
||
auto const pExt = TechnoExt::ExtMap.Find(pThis); | ||
if (pExt->ParentAttachment) | ||
pExt->ParentAttachment->ChildDestroyed(); | ||
|
||
pExt->ParentAttachment = nullptr; | ||
|
||
return 0; | ||
} | ||
|
||
DEFINE_HOOK(0x6F6F20, TechnoClass_Unlimbo_UnlimboAttachments, 0x6) | ||
{ | ||
GET(TechnoClass*, pThis, ESI); | ||
|
||
TechnoExt::UnlimboAttachments(pThis); | ||
|
||
return 0; | ||
} | ||
|
||
DEFINE_HOOK(0x6F6B1C, TechnoClass_Limbo_LimboAttachments, 0x6) | ||
{ | ||
GET(TechnoClass*, pThis, ESI); | ||
|
||
TechnoExt::LimboAttachments(pThis); | ||
|
||
return 0; | ||
} | ||
|
||
DEFINE_HOOK(0x73F528, UnitClass_CanEnterCell_SkipChildren, 0x0) | ||
{ | ||
enum { IgnoreOccupier = 0x73FC10, Continue = 0x73F530 }; | ||
|
||
GET(UnitClass*, pThis, EBX); | ||
GET(TechnoClass*, pOccupier, ESI); | ||
|
||
if (pThis == pOccupier || TechnoExt::IsParentOf(pThis, pOccupier)) | ||
return IgnoreOccupier; | ||
|
||
return Continue; | ||
} | ||
|
||
DEFINE_HOOK(0x51C251, InfantryClass_CanEnterCell_SkipChildren, 0x0) | ||
{ | ||
enum { IgnoreOccupier = 0x51C70F, Continue = 0x51C259 }; | ||
|
||
GET(InfantryClass*, pThis, EBP); | ||
GET(TechnoClass*, pOccupier, ESI); | ||
|
||
if ((TechnoClass*)pThis == pOccupier || TechnoExt::IsParentOf((TechnoClass*)pThis, pOccupier)) | ||
return IgnoreOccupier; | ||
|
||
return Continue; | ||
} | ||
|
||
DEFINE_HOOK(0x6CC763, SuperClass_Place_ChronoWarp_SkipChildren, 0x6) | ||
{ | ||
enum { Skip = 0x6CCCCA, Continue = 0 }; | ||
|
||
GET(FootClass* const, pFoot, ESI); | ||
auto const pExt = TechnoExt::ExtMap.Find(pFoot); | ||
|
||
return pExt->ParentAttachment ? Skip : Continue; | ||
} | ||
|
||
// DEFINE_HOOK(0x6CCCCA, SuperClass_Place_ChronoWarp_HandleAttachment, 0x0) | ||
// { | ||
// enum { Loop = 0x6CC742, Break = 0x6CCCD5 }; | ||
// | ||
// GET(FootClass*, pFoot, ESI) | ||
// | ||
// pFoot = abstract_cast<FootClass*>(pFoot->NextObject); | ||
// | ||
// return pFoot ? Loop : Break; | ||
// } | ||
|
||
// TODO | ||
// 0x4DEAE0 IC for footclass | ||
// 0x457C90 IC (forceshield) for buildings | ||
// 0x6CCCCA Chrono Warp | ||
// 0x4694BB Temporal warhead | ||
// 0x4696FB Locomotor warhead | ||
// ... |
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
Oops, something went wrong.