Merge pull request #3454 from pchote/cargo-antivis
Fix shroud glitches once and for all
This commit is contained in:
@@ -20,7 +20,8 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
public void OnInfiltrate(Actor self, Actor infiltrator)
|
||||
{
|
||||
infiltrator.Owner.Shroud.MergeShroud(self.Owner.Shroud);
|
||||
// Steal and reset the owners exploration
|
||||
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
||||
if (!self.Owner.HasFogVisibility())
|
||||
self.Owner.Shroud.ResetExploration();
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA
|
||||
var total = (double)world.Map.Bounds.Width * world.Map.Bounds.Height;
|
||||
MapControl = world.Actors
|
||||
.Where(a => !a.IsDead() && a.IsInWorld && a.Owner == player && a.HasTrait<RevealsShroud>())
|
||||
.SelectMany(a => world.FindTilesInCircle(a.Location, a.Trait<RevealsShroud>().RevealRange.Clamp(0, 50)))
|
||||
.SelectMany(a => world.FindTilesInCircle(a.Location, a.Trait<RevealsShroud>().Range.Clamp(0, 50)))
|
||||
.Distinct()
|
||||
.Count() / total;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user