Remove IFogVisibilityModifier.

This commit is contained in:
Paul Chote
2017-10-05 17:54:14 +01:00
committed by reaperrr
parent 4dba9f5b88
commit 47634b25f9
6 changed files with 14 additions and 43 deletions

View File

@@ -9,6 +9,7 @@
*/
#endregion
using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits;
@@ -22,7 +23,9 @@ namespace OpenRA.Mods.Cnc.Traits
void INotifyInfiltrated.Infiltrated(Actor self, Actor infiltrator)
{
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
if (!self.Owner.HasFogVisibility)
var preventReset = self.Owner.PlayerActor.TraitsImplementing<IPreventsShroudReset>()
.Any(p => p.PreventShroudReset(self));
if (!preventReset)
self.Owner.Shroud.ResetExploration();
}
}