Skip to content

Commit

Permalink
Format Ext\Building\Body.cpp again
Browse files Browse the repository at this point in the history
  • Loading branch information
Belonit committed Oct 3, 2024
1 parent 94d0e35 commit db19446
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/Ext/Building/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,16 +321,17 @@ bool BuildingExt::ExtData::HandleInfiltrate(HouseClass* pInfiltratorHouse, int m
{
// I assume you were not launching for real, Morton

auto launchTheSWHere = [this](SuperClass* const pSuper, HouseClass* const pHouse)
{
int oldstart = pSuper->RechargeTimer.StartTime;
int oldleft = pSuper->RechargeTimer.TimeLeft;
pSuper->SetReadiness(true);
pSuper->Launch(CellClass::Coord2Cell(this->OwnerObject()->GetCenterCoords()), pHouse->IsCurrentPlayer());
pSuper->Reset();
pSuper->RechargeTimer.StartTime = oldstart;
pSuper->RechargeTimer.TimeLeft = oldleft;
};
auto launchTheSWHere = [this](SuperClass* const pSuper, HouseClass* const pHouse)->void
{
int oldstart = pSuper->RechargeTimer.StartTime;
int oldleft = pSuper->RechargeTimer.TimeLeft;
pSuper->SetReadiness(true);
pSuper->Launch(CellClass::Coord2Cell(this->OwnerObject()->GetCenterCoords()), pHouse->IsCurrentPlayer());
pSuper->Reset();
pSuper->RechargeTimer.StartTime = oldstart;
pSuper->RechargeTimer.TimeLeft = oldleft;
};

int idx = this->TypeExtData->SpyEffect_VictimSuperWeapon;
if (idx >= 0)
launchTheSWHere(pVictimHouse->Supers.Items[idx], pVictimHouse);
Expand Down Expand Up @@ -460,7 +461,7 @@ DEFINE_HOOK(0x454244, BuildingClass_Save_Suffix, 0x7)
DEFINE_JUMP(LJMP, 0x41D9FB, 0x41DA05);


void __fastcall BuildingClass_InfiltratedBy_Wrapper(BuildingClass * pThis, void*, HouseClass * pInfiltratorHouse)
void __fastcall BuildingClass_InfiltratedBy_Wrapper(BuildingClass* pThis, void*, HouseClass* pInfiltratorHouse)
{
int oldBalance = pThis->Owner->Available_Money();
// explicitly call because Ares rewrote it
Expand Down

0 comments on commit db19446

Please sign in to comment.