Skip to content

Commit e901028

Browse files
authored
[Minor] Allow aircraft to continuously kill targets in planning mode (#1729)
In vanilla game, aircraft will always return to airport even it still has remain ammo and planning after target has been destroyed. For now, the aircraft will continue attack next planning target if it still has ammo.
1 parent b21f0f8 commit e901028

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Ext/Aircraft/Hooks.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,15 @@ DEFINE_HOOK(0x4C72F2, EventClass_Execute_AircraftAreaGuard_Untether, 0x6)
771771
return 0;
772772
}
773773

774+
DEFINE_HOOK(0x418CF3, AircraftClass_Mission_Attack_PlanningFix, 0x5)
775+
{
776+
enum { SkipIdle = 0x418D00 };
777+
778+
GET(AircraftClass*, pThis, ESI);
779+
780+
return pThis->Ammo <= 0 || !pThis->TryNextPlanningTokenNode() ? 0 : SkipIdle;
781+
}
782+
774783
#pragma endregion
775784

776785
static __forceinline bool CheckSpyPlaneCameraCount(AircraftClass* pThis)

0 commit comments

Comments
 (0)