Remove PPos overload of FindUnits.
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
if (!limitedAmmo.GiveAmmo()) return NextActivity;
|
||||
|
||||
var hostBuilding = self.World.FindUnits(self.CenterLocation, self.CenterLocation)
|
||||
var hostBuilding = self.World.FindUnits(self.CenterPosition, self.CenterPosition)
|
||||
.FirstOrDefault(a => a.HasTrait<RenderBuilding>());
|
||||
|
||||
if (hostBuilding != null)
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace OpenRA.Mods.RA.Air
|
||||
if (self.Trait<IMove>().Altitude != 0)
|
||||
return null; // not on the ground.
|
||||
|
||||
return self.World.FindUnits(self.CenterLocation, self.CenterLocation)
|
||||
return self.World.FindUnits(self.CenterPosition, self.CenterPosition)
|
||||
.FirstOrDefault( a => a.HasTrait<Reservable>() );
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace OpenRA.Mods.RA
|
||||
case DamageModel.PerCell:
|
||||
{
|
||||
foreach (var t in world.FindTilesInCircle(targetTile, warhead.Size[0]))
|
||||
foreach (var unit in world.FindUnits(t.ToPPos(), (t + new CVec(1,1)).ToPPos()))
|
||||
foreach (var unit in world.FindUnits(t, t))
|
||||
unit.InflictDamage(args.firedBy,
|
||||
(int)(warhead.Damage * warhead.EffectivenessAgainst(unit)), warhead);
|
||||
} break;
|
||||
|
||||
@@ -47,7 +47,8 @@ namespace OpenRA.Mods.RA.Render
|
||||
|
||||
if (!hasTicked)
|
||||
{
|
||||
var adjWalls = self.World.FindUnits(self.CenterLocation - PVecInt.OneCell, self.CenterLocation + PVecInt.OneCell)
|
||||
var vec = new CVec(1, 1);
|
||||
var adjWalls = self.World.FindUnits(self.Location - vec, self.Location + vec)
|
||||
.Where(a => a.Info == self.Info && a != self);
|
||||
|
||||
foreach (var w in adjWalls)
|
||||
|
||||
Reference in New Issue
Block a user