Skip to content

Commit a091935

Browse files
committed
adjust several limbo check
1 parent 7ddc5c1 commit a091935

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/Ext/Techno/Body.Update.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,13 @@ bool TechnoExt::CheckDeathConditions(bool isInLimbo)
144144

145145
auto const pThis = this->OwnerObject();
146146

147-
if (pThis->InLimbo && !pTypeExt->AutoDeath_AllowLimboed.Get(RulesExt::Global()->AutoDeath_AllowLimboed))
148-
return false;
147+
if (pThis->InLimbo)
148+
{
149+
if (!pTypeExt->AutoDeath_AllowLimboed.Get(RulesExt::Global()->AutoDeath_AllowLimboed))
150+
return false;
151+
152+
isInLimbo = true;
153+
}
149154

150155
// Self-destruction must be enabled
151156
const auto howToDie = pTypeExt->AutoDeath_Behavior.Get();
@@ -871,6 +876,10 @@ void TechnoExt::UpdateAttachEffects()
871876
return;
872877

873878
auto const pThis = this->OwnerObject();
879+
880+
if (pThis->InLimbo || pThis->IsImmobilized)
881+
return;
882+
874883
const bool inTunnel = this->IsInTunnelState() || this->IsBurrowedState();
875884
bool markForRedraw = false;
876885
bool requiresRecalc = false;

src/New/Entity/AttachEffectClass.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,6 @@ void AttachEffectClass::AI()
176176
{
177177
auto const pTechno = this->Techno;
178178

179-
if (!pTechno || pTechno->InLimbo || pTechno->IsImmobilized || pTechno->Transporter)
180-
return;
181-
182179
if (this->InitialDelay > 0)
183180
{
184181
this->InitialDelay--;

src/New/Entity/ShieldClass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void ShieldClass::AI()
446446
{
447447
auto const pTechno = this->Techno;
448448

449-
if (!pTechno || pTechno->InLimbo || pTechno->IsImmobilized || pTechno->Transporter)
449+
if (pTechno->InLimbo || pTechno->IsImmobilized)
450450
return;
451451

452452
auto const pTechnoExt = TechnoExt::Fetch(pTechno);

0 commit comments

Comments
 (0)