Remove Shroud.IsVisibleTest and IsExploredTest.

These are no longer any faster than the regular checks, so there's no need to keep them.
This commit is contained in:
RoosterDragon
2015-09-06 21:12:15 +01:00
parent a8d4bc2cef
commit ebf113dfb7
2 changed files with 3 additions and 49 deletions

View File

@@ -83,14 +83,13 @@ namespace OpenRA.Traits
void UpdateVisibility()
{
var wasVisible = Visible;
var isVisibleTest = shroud.IsVisibleTest;
// We are doing the following LINQ manually for performance since this is a hot path.
// Visible = !Footprint.Any(isVisibleTest);
// Visible = !Footprint.Any(shroud.IsVisible);
Visible = true;
foreach (var uv in Footprint)
foreach (var puv in Footprint)
{
if (isVisibleTest(uv))
if (shroud.IsVisible(puv))
{
Visible = false;
break;