Remove redundant BuildingInfluence checks.
Buildings are already excluded by the ActorMap checks.
This commit is contained in:
committed by
Matthias Mailänder
parent
63d597e4ad
commit
5e032edd28
@@ -187,9 +187,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (!LandableTerrainTypes.Contains(type))
|
if (!LandableTerrainTypes.Contains(type))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (world.WorldActor.Trait<BuildingInfluence>().GetBuildingAt(cell) != null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (check == BlockedByActor.None)
|
if (check == BlockedByActor.None)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
@@ -63,9 +63,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (!CanExistInCell(world, cell))
|
if (!CanExistInCell(world, cell))
|
||||||
return SubCell.Invalid;
|
return SubCell.Invalid;
|
||||||
|
|
||||||
if (world.WorldActor.Trait<BuildingInfluence>().GetBuildingAt(cell) != null)
|
|
||||||
return SubCell.Invalid;
|
|
||||||
|
|
||||||
if (check == BlockedByActor.None)
|
if (check == BlockedByActor.None)
|
||||||
return SubCell.FullCell;
|
return SubCell.FullCell;
|
||||||
|
|
||||||
|
|||||||
@@ -180,8 +180,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Don't drop on any actors
|
// Don't drop on any actors
|
||||||
if (self.World.WorldActor.Trait<BuildingInfluence>().GetBuildingAt(p) != null
|
if (self.World.ActorMap.GetActorsAt(p).Any())
|
||||||
|| self.World.ActorMap.GetActorsAt(p).Any())
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
|
|||||||
Reference in New Issue
Block a user