Make locomotor cache and nudging logic aware of mobile trait status.

This commit is contained in:
tovl
2019-09-16 22:48:40 +02:00
committed by teinarss
parent 7e5b1abc0e
commit c4d1468f62
3 changed files with 45 additions and 12 deletions

View File

@@ -331,8 +331,7 @@ namespace OpenRA.Mods.Common.Activities
else
{
var cellInfo = notStupidCells
.SelectMany(c => self.World.ActorMap.GetActorsAt(c)
.Where(a => a.IsIdle && a.Info.HasTraitInfo<MobileInfo>()),
.SelectMany(c => self.World.ActorMap.GetActorsAt(c).Where(Mobile.Ismovable),
(c, a) => new { Cell = c, Actor = a })
.RandomOrDefault(self.World.SharedRandom);
if (cellInfo != null)