Fix IDE0019

This commit is contained in:
RoosterDragon
2023-02-19 10:07:30 +00:00
committed by Pavel Penev
parent 80bb828fe5
commit 6d7c73d498
4 changed files with 6 additions and 9 deletions

View File

@@ -646,8 +646,7 @@ namespace OpenRA.Mods.Common.Pathfinder
/// </summary>
bool ActorIsBlocking(Actor actor)
{
var mobile = actor.OccupiesSpace as Mobile;
var isMovable = mobile != null && !mobile.IsTraitDisabled && !mobile.IsTraitPaused && !mobile.IsImmovable;
var isMovable = actor.OccupiesSpace is Mobile mobile && !mobile.IsTraitDisabled && !mobile.IsTraitPaused && !mobile.IsImmovable;
if (isMovable)
return false;