Skip to content

Commit

Permalink
Merge branch 'develop-Mix4BEtest' into develop-Mix4ECpack
Browse files Browse the repository at this point in the history
  • Loading branch information
CrimRecya committed Dec 27, 2024
2 parents e166495 + 864c8a4 commit 56a4cb2
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 182 deletions.
7 changes: 2 additions & 5 deletions src/Ext/Bullet/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,8 @@ DEFINE_HOOK(0x415F25, AircraftClass_Fire_TrajectorySkipInertiaEffect, 0x6)

GET(BulletClass*, pThis, ESI);

if (auto const pExt = BulletExt::ExtMap.Find(pThis))
{
if (pExt->Trajectory)
return SkipCheck;
}
if (BulletExt::ExtMap.Find(pThis)->Trajectory)
return SkipCheck;

return 0;
}
9 changes: 3 additions & 6 deletions src/Ext/Techno/Hooks.Harvester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ DEFINE_HOOK(0x73EB2C, UnitClass_MissionHarvest_Status2, 0x6)
const auto pType = pThis->Type;
const auto pTypeExt = TechnoTypeExt::ExtMap.Find(pType);

if (!pTypeExt || !pTypeExt->HarvesterQuickUnloader)
if (!pTypeExt->HarvesterQuickUnloader)
return 0;

std::vector<BuildingTypeClass*> docks;
Expand Down Expand Up @@ -316,11 +316,8 @@ DEFINE_HOOK(0x441226, BuildingClass_Unlimbo_RecheckRefinery, 0x6)
{
GET(BuildingClass* const, pThis, ESI);

if (pThis->Type->Refinery)
{
if (const auto pHouseExt = HouseExt::ExtMap.Find(pThis->Owner))
pHouseExt->LastRefineryBuildFrame = Unsorted::CurrentFrame;
}
if (pThis->Type->Refinery && pThis->Owner)
HouseExt::ExtMap.Find(pThis->Owner)->LastRefineryBuildFrame = Unsorted::CurrentFrame;

return 0;
}
Loading

0 comments on commit 56a4cb2

Please sign in to comment.