Skip to content

Commit

Permalink
engine: cmd: when command is already defined and has the same functio…
Browse files Browse the repository at this point in the history
…n pointer, show it as warning
  • Loading branch information
a1batross committed Jan 6, 2025
1 parent 0c4f6ae commit 2a7f131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/common/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2a7f131

Please sign in to comment.