From 8a587ddeab584ab151898791c27cd45615958f9e Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 21 Aug 2021 18:07:10 +0100 Subject: [PATCH] Disable depth-buffer command if EnableDepthBuffer is disabled. --- OpenRA.Mods.Common/Commands/DebugVisualizationCommands.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Mods.Common/Commands/DebugVisualizationCommands.cs b/OpenRA.Mods.Common/Commands/DebugVisualizationCommands.cs index 4bbad3dd2e..1d7e49058a 100644 --- a/OpenRA.Mods.Common/Commands/DebugVisualizationCommands.cs +++ b/OpenRA.Mods.Common/Commands/DebugVisualizationCommands.cs @@ -51,6 +51,9 @@ namespace OpenRA.Mods.Common.Commands foreach (var command in commandHandlers) { + if (command.Key == "depth-buffer" && !w.Map.Grid.EnableDepthBuffer) + continue; + console.RegisterCommand(command.Key, this); help.RegisterHelp(command.Key, command.Value.Description); }