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