Only use largest blocker instead of largest actor for projectile blocker overscan
Before this, we unconditionally used the largest OuterRadius of all actors inside a mod for overscanning of blockable projectiles. However, in many mods the only blockable actors are 1-cell walls, and even if there are gates like in TS, they usually aren't the largest actors in terms of hit-shape. So this measure should save a bit of performance by reducing the overscan radius of blockable projectiles, especially in mods where walls are the only blocking actors.
This commit is contained in:
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public static bool AnyBlockingActorsBetween(World world, WPos start, WPos end, WDist width, out WPos hit)
|
||||
{
|
||||
var actors = world.FindActorsOnLine(start, end, width);
|
||||
var actors = world.FindBlockingActorsOnLine(start, end, width);
|
||||
var length = (end - start).Length;
|
||||
|
||||
foreach (var a in actors)
|
||||
|
||||
Reference in New Issue
Block a user