From 2a7f13151ad1601bcbbef8521326af1ba56528b3 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 6 Jan 2025 13:51:06 +0300 Subject: [PATCH] engine: cmd: when command is already defined and has the same function pointer, show it as warning --- engine/common/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/common/cmd.c b/engine/common/cmd.c index a69fc1fae..5c109f4a8 100644 --- a/engine/common/cmd.c +++ b/engine/common/cmd.c @@ -717,7 +717,7 @@ int Cmd_AddCommandEx( const char *cmd_name, xcommand_t function, const char *cmd } else { - Con_DPrintf( S_ERROR "%s: %s already defined\n", funcname, cmd_name ); + Con_DPrintf( "%s%s: %s already defined\n", cmd->function == function ? S_WARN : S_ERROR, funcname, cmd_name ); return 0; } }