Merge pull request #3538 from chrisforbes/fix-legacy-capture-timing
fix a timing bug in LegacyCaptureActor
This commit is contained in:
@@ -36,10 +36,10 @@ namespace OpenRA.Mods.RA.Activities
|
|||||||
var capturableInfo = target.Actor.Info.Traits.Get<LegacyCapturableInfo>();
|
var capturableInfo = target.Actor.Info.Traits.Get<LegacyCapturableInfo>();
|
||||||
|
|
||||||
var health = target.Actor.Trait<Health>();
|
var health = target.Actor.Trait<Health>();
|
||||||
var lowEnoughHealth = health.HP <= capturableInfo.CaptureThreshold * health.MaxHP;
|
|
||||||
|
|
||||||
self.World.AddFrameEndTask(w =>
|
self.World.AddFrameEndTask(w =>
|
||||||
{
|
{
|
||||||
|
var lowEnoughHealth = health.HP <= capturableInfo.CaptureThreshold * health.MaxHP;
|
||||||
if (!capturesInfo.Sabotage || lowEnoughHealth || target.Actor.Owner.NonCombatant)
|
if (!capturesInfo.Sabotage || lowEnoughHealth || target.Actor.Owner.NonCombatant)
|
||||||
{
|
{
|
||||||
var oldOwner = target.Actor.Owner;
|
var oldOwner = target.Actor.Owner;
|
||||||
|
|||||||
Reference in New Issue
Block a user