Don't print any warnings to the log if an unrecognized gamefunc is dispatched; this is expected and normal when they are renamed.

git-svn-id: https://svn.eduke32.com/eduke32@6188 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-06-17 11:42:12 +00:00
parent 81a6f29dd4
commit 66c85ec71f

View file

@ -1816,7 +1816,12 @@ int32_t OSD_Dispatch(const char *cmd)
if ((symb = findexactsymbol(wp)) == NULL) if ((symb = findexactsymbol(wp)) == NULL)
{ {
if ((wp[0] != '/' || wp[1] != '/') && !m32_osd_tryscript) // cheap hack for comments in cfgs static char const s_gamefunc_[] = "gamefunc_";
size_t const strlen_gamefunc_ = ARRAY_SIZE(s_gamefunc_)-1;
size_t const strlen_wp = Bstrlen(wp);
if ((wp[0] != '/' || wp[1] != '/') && // cheap hack for comments in cfgs
(strlen_gamefunc_ >= strlen_wp || Bstrncmp(wp, s_gamefunc_, strlen_gamefunc_)) &&
!m32_osd_tryscript)
{ {
OSD_Printf(OSDTEXT_RED "\"%s\" is not a valid command or cvar\n", wp); OSD_Printf(OSDTEXT_RED "\"%s\" is not a valid command or cvar\n", wp);
} }