use IsPathableCell instead of IsCellBuildable
This commit is contained in:
@@ -23,6 +23,7 @@ using System.Collections.Generic;
|
|||||||
using OpenRA.Mods.RA;
|
using OpenRA.Mods.RA;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
using OpenRA.Traits.Activities;
|
using OpenRA.Traits.Activities;
|
||||||
|
using OpenRA.GameRules;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA_NG
|
namespace OpenRA.Mods.RA_NG
|
||||||
{
|
{
|
||||||
@@ -69,7 +70,7 @@ namespace OpenRA.Mods.RA_NG
|
|||||||
for (var n = 0; n < threshold; n++ )
|
for (var n = 0; n < threshold; n++ )
|
||||||
{
|
{
|
||||||
var p = self.World.ChooseRandomCell(self.World.SharedRandom);
|
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 =>
|
self.World.AddFrameEndTask(w =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
bool IsSuitableCell(Actor self, int2 p)
|
bool IsSuitableCell(Actor self, int2 p)
|
||||||
{
|
{
|
||||||
// rude hack
|
return self.World.IsPathableCell(p, waterDrop ? UnitMovementType.Float : UnitMovementType.Wheel);
|
||||||
return self.World.IsCellBuildable(p, waterDrop);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishedDropping(Actor self)
|
void FinishedDropping(Actor self)
|
||||||
|
|||||||
Reference in New Issue
Block a user