Skip to content

Commit 71d1329

Browse files
committed
fix self owned AE recalculation
1 parent c8955a5 commit 71d1329

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/New/Entity/AttachEffectClass.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ void AttachEffectClass::AI()
173173

174174
if (this->Type->HasTint())
175175
this->Techno->MarkForRedraw();
176+
177+
this->NeedsRecalculateStat = true;
176178
}
177179

178180
if (this->CurrentDelay > 0)
@@ -193,6 +195,7 @@ void AttachEffectClass::AI()
193195
if (!this->ShouldBeDiscardedNow())
194196
{
195197
this->RefreshDuration();
198+
this->NeedsRecalculateStat = true;
196199
this->NeedsDurationRefresh = false;
197200
}
198201

@@ -210,11 +213,18 @@ void AttachEffectClass::AI()
210213
this->CurrentDelay = this->Delay;
211214

212215
if (this->Delay > 0)
216+
{
213217
this->KillAnim();
218+
this->NeedsRecalculateStat = true;
219+
}
214220
else if (!this->ShouldBeDiscardedNow())
221+
{
215222
this->RefreshDuration();
223+
}
216224
else
225+
{
217226
this->NeedsDurationRefresh = true;
227+
}
218228

219229
return;
220230
}
@@ -481,6 +491,7 @@ bool AttachEffectClass::ResetIfRecreatable()
481491
this->KillAnim();
482492
this->Duration = 0;
483493
this->CurrentDelay = this->RecreationDelay;
494+
this->NeedsRecalculateStat = true;
484495

485496
return true;
486497
}

0 commit comments

Comments
 (0)