Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,3 +643,5 @@ This page lists all the individual contributions to the project by their author.
- **Damfoos** - extensive and thorough testing
- **Dmitry Volkov** - extensive and thorough testing
- **Rise of the East community** - extensive playtesting of in-dev features
- **ahasasjeb**:
- Fixed AI continuing to produce units and construct buildings from buildings affected by EMP
1 change: 1 addition & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- `DeployingAnim` now supports both `Normalized=true` and `Reverse=true`. Keep in mind `Reverse` uses `LoopEnd` for frame amount instead of `End` even without `LoopCount` > 1.
- `DeployingAnim` using unit drawer now also tint accordingly with the unit.
- Fixed the bug that armor multiplier of new attacheffect will have extra take effect once if restricted warheads.
- Fixed AI continuing to produce units and construct buildings from buildings affected by EMP.

## Fixes / interactions with other extensions

Expand Down
2 changes: 2 additions & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ New:
- [Customize hardcoded projectile initial facing behavior](Fixed-or-Improved-Logics.md#customizing-initial-facing-behavior) (by Starkku)
- Health bar permanently displayed (by FlyStar)
- [`IsSimpleDeployer` facing customization & directional deploy animations](Fixed-or-Improved-Logics.md#issimpleDeployer-facing-and-animation-customization) (by Starkku)
- Fixed AI continuing to produce units and construct buildings from buildings affected by EMP. (by ahasasjeb)

Vanilla fixes:
- Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya)
Expand All @@ -459,6 +460,7 @@ Vanilla fixes:
- `DeployingAnim` now supports both `Normalized=true` and `Reverse=true` (by Starkku)
- `DeployingAnim` using unit drawer now also tint accordingly with the unit (by Starkku)


Phobos fixes:
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)
- Fixed an issue that `FireAngle` was not taken into account when drawing barrel in `TurretShadow` (by CrimRecya)
Expand Down
21 changes: 19 additions & 2 deletions src/Ext/Techno/Body.Update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
#include <Kamikaze.h>
#include <JumpjetLocomotionClass.h>
#include <FlyLocomotionClass.h>
#include <BuildingClass.h>
#include <FactoryClass.h>
#include <Utilities/EnumFunctions.h>
#include <Utilities/AresFunctions.h>

#include <Ext/Anim/Body.h>
#include <Ext/Bullet/Body.h>
#include <Ext/House/Body.h>
#include <Ext/WeaponType/Body.h>
#include <Ext/Scenario/Body.h>
#include <Utilities/EnumFunctions.h>
#include <Utilities/AresFunctions.h>


// TechnoClass_AI_0x6F9E50
Expand Down Expand Up @@ -1638,6 +1640,21 @@ void TechnoExt::ExtData::UpdateRearmInEMPState()

if (pThis->ReloadTimer.InProgress() && pTypeExt->NoReload_UnderEMP.Get(RulesExt::Global()->NoReload_UnderEMP))
pThis->ReloadTimer.StartTime++;

// Pause building factory production under EMP / Deactivated
if (auto const pBuilding = abstract_cast<BuildingClass*>(pThis))
{
if (auto const pFactory = pBuilding->Factory)
{
if (pFactory->Object && pFactory->Production.Rate > 0)
{
if (pFactory->Production.Timer.HasStarted() && !pFactory->Production.Timer.Expired())
{
pFactory->Production.Timer.StartTime++;
}
}
}
}
}

void TechnoExt::ExtData::UpdateRearmInTemporal()
Expand Down
Loading