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); }