Fix weather blocking in some instances (#14561)

This commit is contained in:
metalgearsloth
2023-03-11 14:11:19 +11:00
committed by GitHub
parent 304ec2c8b3
commit 22ae0e7ed8
5 changed files with 26 additions and 4 deletions

View File

@@ -95,6 +95,7 @@ public sealed class WeatherOverlay : Overlay
{
var bodyQuery = _entManager.GetEntityQuery<PhysicsComponent>();
var xformQuery = _entManager.GetEntityQuery<TransformComponent>();
var weatherIgnoreQuery = _entManager.GetEntityQuery<IgnoreWeatherComponent>();
foreach (var grid in _mapManager.FindGridsIntersecting(mapId, worldAABB))
{
@@ -105,7 +106,7 @@ public sealed class WeatherOverlay : Overlay
foreach (var tile in grid.GetTilesIntersecting(worldAABB))
{
// Ignored tiles for stencil
if (_weather.CanWeatherAffect(grid, tile, bodyQuery))
if (_weather.CanWeatherAffect(grid, tile, weatherIgnoreQuery, bodyQuery))
{
continue;
}