}
}
+static void CL_ToggleMenu_Hook(void)
+{
+#ifdef CONFIG_MENU
+ // remove menu
+ if (key_dest == key_menu || key_dest == key_menu_grabbed)
+ MR_ToggleMenu(0);
+#endif
+ key_dest = key_game;
+}
+
extern cvar_t rcon_secure;
/*
CL_Video_Init();
host.hook.ConnectLocal = CL_EstablishConnection_Local;
+ host.hook.Disconnect = CL_Disconnect;
host.hook.CL_Intermission = CL_Intermission;
+ host.hook.ToggleMenu = CL_ToggleMenu_Hook;
}
}
struct
{
void (*ConnectLocal)(void);
+ void (*Disconnect)(void);
+ void (*ToggleMenu)(void);
qbool (*CL_Intermission)(void); // Quake compatibility
qbool (*SV_CanSave)(void); // Quake compatibility
} hook;
if (gamemode == GAME_DELUXEQUAKE)
Cvar_Set(&cvars_all, "warpmark", "");
- cls.demonum = -1; // stop demo loop in case this fails
+ if(host.hook.Disconnect)
+ host.hook.Disconnect();
- CL_Disconnect ();
SV_Shutdown();
if(svs.maxclients != svs.maxclients_next)
svs.clients = (client_t *)Mem_Alloc(sv_mempool, sizeof(client_t) * svs.maxclients);
}
-#ifdef CONFIG_MENU
- // remove menu
- if (key_dest == key_menu || key_dest == key_menu_grabbed)
- MR_ToggleMenu(0);
-#endif
- key_dest = key_game;
+ if(host.hook.ToggleMenu)
+ host.hook.ToggleMenu();
svs.serverflags = 0; // haven't completed an episode yet
strlcpy(level, Cmd_Argv(cmd, 1), sizeof(level));
return;
}
-#ifdef CONFIG_MENU
- // remove menu
- if (key_dest == key_menu || key_dest == key_menu_grabbed)
- MR_ToggleMenu(0);
-#endif
- key_dest = key_game;
+ if(host.hook.ToggleMenu)
+ host.hook.ToggleMenu();
SV_SaveSpawnparms ();
strlcpy(level, Cmd_Argv(cmd, 1), sizeof(level));
return;
}
-#ifdef CONFIG_MENU
- // remove menu
- if (key_dest == key_menu || key_dest == key_menu_grabbed)
- MR_ToggleMenu(0);
-#endif
- key_dest = key_game;
+ if(host.hook.ToggleMenu)
+ host.hook.ToggleMenu();
strlcpy(mapname, sv.name, sizeof(mapname));
SV_SpawnServer(mapname);