From 142f823e6fd526fd9d41be8d1d1fbb47190d85b9 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 24 Oct 2019 19:59:13 +0200 Subject: [PATCH] Explain that CanEnterCell ignores 'subCell' if there is a free subcell --- OpenRA.Mods.Common/Traits/Mobile.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index f3881d6201..620bea4cd2 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -86,6 +86,9 @@ namespace OpenRA.Mods.Common.Traits // initialized and used by CanEnterCell Locomotor locomotor; + /// + /// Note: If the target has any free subcell, the value of is ignored. + /// public bool CanEnterCell(World world, Actor self, CPos cell, SubCell subCell = SubCell.FullCell, Actor ignoreActor = null, BlockedByActor check = BlockedByActor.All) { // PERF: Avoid repeated trait queries on the hot path