Merge pull request #11232 from abcdefg30/navalRepair
Fix possible instant repairs by spamming Repair activities
This commit is contained in:
@@ -32,11 +32,20 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
|
|
||||||
public override Activity Tick(Actor self)
|
public override Activity Tick(Actor self)
|
||||||
{
|
{
|
||||||
if (IsCanceled) return NextActivity;
|
if (IsCanceled)
|
||||||
if (host == null || !host.IsInWorld) return NextActivity;
|
{
|
||||||
|
if (remainingTicks-- == 0)
|
||||||
|
return NextActivity;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (host == null || !host.IsInWorld)
|
||||||
|
return NextActivity;
|
||||||
|
|
||||||
health = self.TraitOrDefault<Health>();
|
health = self.TraitOrDefault<Health>();
|
||||||
if (health == null) return NextActivity;
|
if (health == null)
|
||||||
|
return NextActivity;
|
||||||
|
|
||||||
if (health.DamageState == DamageState.Undamaged)
|
if (health.DamageState == DamageState.Undamaged)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user