PlayerStats_Init();
+ // MOD AUTHORS: change this, and possibly remove a few of the blocks below to ignore certain changes
modname = "Xonotic";
- // weird mutators that deserve to count as mod
- if(autocvar_g_minstagib)
- modname = "MinstaGib";
- // weird game types that deserve to count as mod
- if(g_cts)
- modname = "CTS";
// physics/balance/config changes that count as mod
if(cvar_string("g_mod_physics") != cvar_defstring("g_mod_physics"))
modname = cvar_string("g_mod_physics");
modname = cvar_string("g_mod_balance");
if(cvar_string("g_mod_config") != cvar_defstring("g_mod_config"))
modname = cvar_string("g_mod_config");
+ // weird mutators that deserve to count as mod
+ if(autocvar_g_minstagib)
+ modname = "MinstaGib";
+ // extra mutators that deserve to count as mod
+ MUTATOR_CALLHOOK(SetModname);
+ // weird game types that deserve to count as mod
+ if(g_cts)
+ modname = "CTS";
+ // save it for later
modname = strzone(modname);
+ WinningConditionHelper(); // set worldstatus
+
world_initialized = 1;
}
MUTATOR_HOOKABLE(SV_StartFrame);
// runs globally each server frame
+
+MUTATOR_HOOKABLE(SetModname);
+ // OUT
+ string modname; // name of the mutator/mod if it warrants showing as such in the server browser
return TRUE;
}
+MUTATOR_HOOKFUNCTION(sandbox_SetModname)
+{
+ modname = "Sandbox";
+ return TRUE;
+}
+
MUTATOR_DEFINITION(sandbox)
{
MUTATOR_HOOK(SV_ParseClientCommand, sandbox_PlayerCommand, CBC_ORDER_ANY);
MUTATOR_HOOK(SV_StartFrame, sandbox_StartFrame, CBC_ORDER_ANY);
+ MUTATOR_HOOK(SetModname, sandbox_SetModname, CBC_ORDER_ANY);
MUTATOR_ONADD
{