void __cdecl RestartPython(void) { Com_Printf("Restarting Python...\n"); if (PyMinqlx_IsInitialized()) PyMinqlx_Finalize(); PyMinqlx_Initialize(); // minqlx initializes after the first new game starts, but since the game already // start, we manually trigger the event to make it initialize properly. NewGameDispatcher(0); }
void __cdecl My_G_InitGame(int levelTime, int randomSeed, int restart) { G_InitGame(levelTime, randomSeed, restart); if (!cvars_initialized) { // Only called once. SetTag(); } InitializeCvars(); #ifndef NOPY // Only call it if we're loading a completely new game, otherwise it will also // be called when people ready up and the game starts. if (!restart) NewGameDispatcher(); #endif }