Fix building shroud exploration
This commit is contained in:
@@ -7,6 +7,7 @@ using OpenRa.Graphics;
|
|||||||
using OpenRa.Traits;
|
using OpenRa.Traits;
|
||||||
using OpenRa.FileFormats;
|
using OpenRa.FileFormats;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using OpenRa.GameRules;
|
||||||
|
|
||||||
namespace OpenRa
|
namespace OpenRa
|
||||||
{
|
{
|
||||||
@@ -96,9 +97,17 @@ namespace OpenRa
|
|||||||
|
|
||||||
public void Explore(Actor a)
|
public void Explore(Actor a)
|
||||||
{
|
{
|
||||||
Explore(a.World,
|
// Buildings: explore from each cell in the footprint
|
||||||
(1f / Game.CellSize * a.CenterLocation).ToInt2(),
|
if (a.Info.Traits.Contains<BuildingInfo>())
|
||||||
a.Info.Traits.Get<OwnedActorInfo>().Sight);
|
{
|
||||||
|
var bi = a.Info.Traits.Get<BuildingInfo>();
|
||||||
|
foreach (var t in Footprint.Tiles(a.Info.Name, bi, a.Location))
|
||||||
|
Explore(a.World,t,a.Info.Traits.Get<OwnedActorInfo>().Sight);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Explore(a.World,
|
||||||
|
(1f / Game.CellSize * a.CenterLocation).ToInt2(),
|
||||||
|
a.Info.Traits.Get<OwnedActorInfo>().Sight);
|
||||||
}
|
}
|
||||||
|
|
||||||
static readonly byte[][] SpecialShroudTiles =
|
static readonly byte[][] SpecialShroudTiles =
|
||||||
|
|||||||
Reference in New Issue
Block a user