Skip to content

Commit

Permalink
Changes for YRpp PR#17 (#1173)
Browse files Browse the repository at this point in the history
* Changes for YRpp PR#17

* Update YRpp
  • Loading branch information
ZivDero authored Jan 2, 2024
1 parent f6d849d commit 4ca5078
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion YRpp
2 changes: 1 addition & 1 deletion src/Ext/SWType/FireSuperWeapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ void SWTypeExt::ExtData::ApplySWNext(SuperClass* pSW, const CellStruct& cell)
{
const auto pNextTypeExt = SWTypeExt::ExtMap.Find(pSuper->Type);
if (!this->SW_Next_RealLaunch ||
(pSuper->Granted && pSuper->IsCharged && !pSuper->IsOnHold && pHouse->CanTransactMoney(pNextTypeExt->Money_Amount)))
(pSuper->IsPresent && pSuper->IsReady && !pSuper->IsSuspended && pHouse->CanTransactMoney(pNextTypeExt->Money_Amount)))
{
if (this->SW_Next_IgnoreInhibitors || !pNextTypeExt->HasInhibitor(pHouse, cell)
&& (this->SW_Next_IgnoreDesignators || pNextTypeExt->HasDesignator(pHouse, cell)))
Expand Down
4 changes: 2 additions & 2 deletions src/Ext/Script/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1237,9 +1237,9 @@ void ScriptExt::ChronoshiftTeamToTarget(TeamClass* pTeam, TechnoClass* pTeamLead
return;
}

if (!pSuperChronosphere->IsCharged || (pSuperChronosphere->IsPowered() && !pOwner->Is_Powered()))
if (!pSuperChronosphere->IsReady || (pSuperChronosphere->IsPowered() && !pOwner->Is_Powered()))
{
if (pSuperChronosphere->Granted)
if (pSuperChronosphere->IsPresent)
{
int rechargeTime = pSuperChronosphere->GetRechargeTime();
int timeLeft = pSuperChronosphere->RechargeTimer.GetTimeLeft();
Expand Down
2 changes: 1 addition & 1 deletion src/Ext/WarheadType/Detonate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void WarheadTypeExt::ExtData::Detonate(TechnoClass* pOwner, HouseClass* pHouse,
const auto pSWExt = SWTypeExt::ExtMap.Find(pSuper->Type);
const auto cell = CellClass::Coord2Cell(coords);

if (pHouse->CanTransactMoney(pSWExt->Money_Amount) && (!this->LaunchSW_RealLaunch || (pSuper->Granted && pSuper->IsCharged && !pSuper->IsOnHold)))
if (pHouse->CanTransactMoney(pSWExt->Money_Amount) && (!this->LaunchSW_RealLaunch || (pSuper->IsPresent && pSuper->IsReady && !pSuper->IsSuspended)))
{
if (this->LaunchSW_IgnoreInhibitors || !pSWExt->HasInhibitor(pHouse, cell)
&& (this->LaunchSW_IgnoreDesignators || pSWExt->HasDesignator(pHouse, cell)))
Expand Down

0 comments on commit 4ca5078

Please sign in to comment.