From 9a159108e8a68b25e438979c4cad73baaff91eaf Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 12 Apr 2010 20:24:29 +1200 Subject: [PATCH] use IsPathableCell instead of IsCellBuildable --- OpenRA.Mods.RA-NG/CrateDrop.cs | 3 ++- OpenRA.Mods.RA/ParaDrop.cs | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.RA-NG/CrateDrop.cs b/OpenRA.Mods.RA-NG/CrateDrop.cs index 4c463f7d71..128745a5d3 100644 --- a/OpenRA.Mods.RA-NG/CrateDrop.cs +++ b/OpenRA.Mods.RA-NG/CrateDrop.cs @@ -23,6 +23,7 @@ using System.Collections.Generic; using OpenRA.Mods.RA; using OpenRA.Traits; using OpenRA.Traits.Activities; +using OpenRA.GameRules; namespace OpenRA.Mods.RA_NG { @@ -69,7 +70,7 @@ namespace OpenRA.Mods.RA_NG for (var n = 0; n < threshold; n++ ) { var p = self.World.ChooseRandomCell(self.World.SharedRandom); - if (self.World.IsCellBuildable(p, inWater)) + if (self.World.IsPathableCell(p, inWater ? UnitMovementType.Float : UnitMovementType.Wheel)) { self.World.AddFrameEndTask(w => { diff --git a/OpenRA.Mods.RA/ParaDrop.cs b/OpenRA.Mods.RA/ParaDrop.cs index 77fdf7a2a1..7bca5b90ab 100644 --- a/OpenRA.Mods.RA/ParaDrop.cs +++ b/OpenRA.Mods.RA/ParaDrop.cs @@ -80,8 +80,7 @@ namespace OpenRA.Mods.RA bool IsSuitableCell(Actor self, int2 p) { - // rude hack - return self.World.IsCellBuildable(p, waterDrop); + return self.World.IsPathableCell(p, waterDrop ? UnitMovementType.Float : UnitMovementType.Wheel); } void FinishedDropping(Actor self)