Fix war factory not opening its door properly

This commit is contained in:
Gustas
2023-10-21 23:32:06 +03:00
committed by Paul Chote
parent 018777472a
commit 2733ed4b1c

View File

@@ -10,6 +10,7 @@
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Traits;
@@ -61,7 +62,8 @@ namespace OpenRA.Mods.Common.Traits.Render
if (exitingActor == null)
return;
if (!exitingActor.IsInWorld || exitingActor.Location != openExit || exitingActor.CurrentActivity is not Mobile.ReturnToCellActivity)
if (!exitingActor.IsInWorld || exitingActor.Location != openExit
|| (!exitingActor.CurrentActivity?.ActivitiesImplementing<Mobile.ReturnToCellActivity>().Any() ?? true))
{
desiredFrame = 0;
exitingActor = null;