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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user