From 81fe5c010b662248ccf011817bd8dbc83119e0f0 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 12 Oct 2016 14:53:15 +1000 Subject: [PATCH] Fix mutators not setting modname --- qcsrc/server/g_world.qc | 3 ++- qcsrc/server/mutators/events.qh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index b2b52007a..48b587e5e 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -917,7 +917,8 @@ spawnfunc(worldspawn) if(cvar_string("g_mod_config") != cvar_defstring("g_mod_config")) modname = cvar_string("g_mod_config"); // extra mutators that deserve to count as mod - MUTATOR_CALLHOOK(SetModname); + MUTATOR_CALLHOOK(SetModname, modname); + modname = M_ARGV(0, string); // save it for later modname = strzone(modname); diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 179faf1f6..0e0c7271e 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -480,6 +480,7 @@ MUTATOR_HOOKABLE(SV_StartFrame, EV_NO_ARGS); #define EV_SetModname(i, o) \ /** name of the mutator/mod if it warrants showing as such in the server browser */ \ + /**/ i(string, MUTATOR_ARGV_0_string) \ /**/ o(string, MUTATOR_ARGV_0_string) \ /**/ MUTATOR_HOOKABLE(SetModname, EV_SetModname); -- 2.39.2