From 3bde4ebbaf9801e58c3f62a516670db015950bca Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Sat, 4 Dec 2021 18:03:35 +0000 Subject: [PATCH] Fix Move.PathSearchOrder Each successive value of BlockedByActor is a superset of the previous value. Having a mixed up order of values in PathSearchOrder is not useful. In the previous ordering, if a search for Immovable failed to find a path, it would then attempt Stationary. However Stationary is *more* restrictive then Immovable. If Immovable failed, there is no way Stationary could succeed. This means the search for Stationary is wasted effort. In the fixed ordering, we try Stationary first. In the fixed ordering there are no pointless searches. Every search might succeed where the previous one failed and is therefore useful to try. --- OpenRA.Mods.Common/Activities/Move/Move.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Activities/Move/Move.cs b/OpenRA.Mods.Common/Activities/Move/Move.cs index 08c2416e8d..af1fbdad2f 100644 --- a/OpenRA.Mods.Common/Activities/Move/Move.cs +++ b/OpenRA.Mods.Common/Activities/Move/Move.cs @@ -33,8 +33,8 @@ namespace OpenRA.Mods.Common.Activities static readonly BlockedByActor[] PathSearchOrder = { BlockedByActor.All, - BlockedByActor.Immovable, BlockedByActor.Stationary, + BlockedByActor.Immovable, BlockedByActor.None };