Skip to content

Commit 4747562

Browse files
committed
fix with b81a1dd that broke DeployedCrushable
1 parent fd9f115 commit 4747562

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/Ext/Infantry/Hooks.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ DEFINE_HOOK(0x51B2BD, InfantryClass_UpdateTarget_IsControlledByHuman, 0x6)
1616
DEFINE_HOOK(0x520B3E, InfantryClass_DoingAI_DeployConvert_Deploy, 0x6)
1717
{
1818
GET(InfantryClass*, pThis, ESI);
19-
auto const pTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Type);
2019
auto const pExt = TechnoExt::ExtMap.Find(pThis);
20+
auto const pTypeExt = pExt->TypeExtData;
2121

2222
if (pTypeExt->Convert_Deploy && !pExt->HasDeployConverted)
2323
{
@@ -26,15 +26,15 @@ DEFINE_HOOK(0x520B3E, InfantryClass_DoingAI_DeployConvert_Deploy, 0x6)
2626
TechnoExt::ConvertToType(pThis, pTypeExt->Convert_Deploy);
2727
}
2828

29-
return 0x520B44;
29+
return 0;
3030
}
3131

3232
// Undeploy case: DoAction(Ready)
3333
DEFINE_HOOK(0x520B99, InfantryClass_DoingAI_DeployConvert_Undeploy, 0x6)
3434
{
3535
GET(InfantryClass*, pThis, ESI);
36-
auto const pTypeExt = TechnoTypeExt::ExtMap.Find(pThis->Type);
3736
auto const pExt = TechnoExt::ExtMap.Find(pThis);
37+
auto const pTypeExt = pExt->TypeExtData;
3838

3939
if (pTypeExt->Convert_Undeploy && !pExt->HasUndeployConverted)
4040
{
@@ -43,7 +43,7 @@ DEFINE_HOOK(0x520B99, InfantryClass_DoingAI_DeployConvert_Undeploy, 0x6)
4343
TechnoExt::ConvertToType(pThis, pTypeExt->Convert_Undeploy);
4444
}
4545

46-
return 0x520B9F;
46+
return 0;
4747
}
4848

4949
// Reset mark when Deploy/Undeploy

0 commit comments

Comments
 (0)