Add Visualization chat commands

This commit is contained in:
rob-v
2017-05-21 09:17:31 +02:00
committed by Oliver Brakmann
parent 8403adba37
commit d4e9e0e069
18 changed files with 145 additions and 71 deletions

View File

@@ -54,12 +54,9 @@ namespace OpenRA.Mods.Common.Warheads
{
var world = firedBy.World;
if (world.LocalPlayer != null)
{
var devMode = world.LocalPlayer.PlayerActor.TraitOrDefault<DeveloperMode>();
if (devMode != null && devMode.ShowCombatGeometry)
world.WorldActor.Trait<WarheadDebugOverlay>().AddImpact(pos, Range, DebugOverlayColor);
}
var debugVis = world.WorldActor.TraitOrDefault<DebugVisualizations>();
if (debugVis != null && debugVis.CombatGeometry)
world.WorldActor.Trait<WarheadDebugOverlay>().AddImpact(pos, Range, DebugOverlayColor);
// This only finds actors where the center is within the search radius,
// so we need to search beyond the maximum spread to account for actors with large health radius