-
-
Notifications
You must be signed in to change notification settings - Fork 128
fix:Pause AI building production and spawner aircraft under EMP (respect ImmuneToEMP) #1833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
f6d2f21
621e053
1813f54
a4f09b7
70b3df8
03d8e5a
69f19c3
82b85f5
ee75e09
1624721
906c771
9c7afb0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,13 @@ | |
|
|
||
| #include <SpawnManagerClass.h> | ||
| #include <TunnelLocomotionClass.h> | ||
| #include <BuildingClass.h> | ||
|
|
||
| #include <Ext/Anim/Body.h> | ||
| #include <Ext/TechnoType/Body.h> | ||
| #include <Ext/Scenario/Body.h> | ||
| #include <Ext/WeaponType/Body.h> | ||
| #include <Ext/Bullet/Body.h> | ||
|
|
||
| #pragma region SlaveManagerClass | ||
|
|
||
|
|
@@ -155,6 +160,15 @@ DEFINE_HOOK(0x6B78D3, SpawnManagerClass_Update_Spawns, 0x6) | |
| auto const pOwner = pThis->Owner; | ||
| auto const pTypeExt = TechnoExt::ExtMap.Find(pOwner)->TypeExtData; | ||
|
|
||
| if (auto const pBuilding = abstract_cast<BuildingClass*, true>(pOwner)) | ||
| { | ||
| if (pBuilding->Type->Powered && !pBuilding->IsPowerOnline()) | ||
ahasasjeb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return 0; | ||
| } | ||
|
|
||
| if (const auto pOwnerType = pOwner->GetTechnoType(); pOwnerType && pOwnerType->SpawnRegenRate <= 0) | ||
ahasasjeb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return 0; | ||
|
|
||
|
||
| if (pTypeExt->Spawns_Queue.empty()) | ||
| return 0; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.