Fix the tech tree not refreshing properly on owner change
This commit is contained in:
@@ -301,11 +301,11 @@ namespace OpenRA
|
|||||||
Owner = newOwner;
|
Owner = newOwner;
|
||||||
Generation++;
|
Generation++;
|
||||||
|
|
||||||
if (wasInWorld)
|
|
||||||
w.Add(this);
|
|
||||||
|
|
||||||
foreach (var t in TraitsImplementing<INotifyOwnerChanged>())
|
foreach (var t in TraitsImplementing<INotifyOwnerChanged>())
|
||||||
t.OnOwnerChanged(this, oldOwner, newOwner);
|
t.OnOwnerChanged(this, oldOwner, newOwner);
|
||||||
|
|
||||||
|
if (wasInWorld)
|
||||||
|
w.Add(this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
|
void INotifyOwnerChanged.OnOwnerChanged(Actor self, Player oldOwner, Player newOwner)
|
||||||
{
|
{
|
||||||
skipTriggerUpdate = false;
|
Game.RunAfterTick(() => skipTriggerUpdate = false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user