예제 #1
0
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);
}
예제 #2
0
파일: hooks.c 프로젝트: PerpetualWar/minqlx
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
}