Example #1
0
//
// D_StartTitle
//
void D_StartTitle(void)
{
    if (netgame)
    {
        if (gametype == GT_COOP)
        {
            G_SetGamestate(GS_WAITINGPLAYERS); // hack to prevent a command repeat

            if (server)
            {
                char mapname[6];

                strlcpy(mapname, G_BuildMapName(spstage_start), sizeof (mapname));
                strlwr(mapname);
                mapname[5] = '\0';

                COM_BufAddText(va("map %s\n", mapname));
            }
        }

        return;
    }

    // okay, stop now
    // (otherwise the game still thinks we're playing!)
    SV_StopServer();

    // In case someone exits out at the same time they start a time attack run,
    // reset modeattacking
    modeattacking = ATTACKING_NONE;

    // empty maptol so mario/etc sounds don't play in sound test when they shouldn't
    maptol = 0;

    gameaction = ga_nothing;
    playerdeadview = false;
    displayplayer = consoleplayer = 0;
    //demosequence = -1;
    gametype = GT_COOP;
    paused = false;
    advancedemo = false;
    F_StartTitleScreen();
    CON_ToggleOff();

    // Reset the palette
#ifdef HWRENDER
    if (rendermode == render_opengl)
        HWR_SetPaletteColor(0);
    else
#endif
        if (rendermode != render_none)
            V_SetPaletteLump("PLAYPAL");
}
Example #2
0
//
// D_StartTitle
//
void D_StartTitle(void)
{
	if (netgame)
	{
		if (gametype == GT_COOP)
		{
			G_SetGamestate(GS_WAITINGPLAYERS); // hack to prevent a command repeat

			if (server)
			{
				char mapname[6];

				strlcpy(mapname, G_BuildMapName(spstage_start), sizeof (mapname));
				strlwr(mapname);
				mapname[5] = '\0';

				COM_BufAddText(va("map %s\n", mapname));
			}
		}

		return;
	}

	gameaction = ga_nothing;
	playerdeadview = false;
	displayplayer = consoleplayer = 0;
	//demosequence = -1;
	gametype = GT_COOP;
	paused = false;
	advancedemo = false;
	F_StartTitleScreen();
	CON_ToggleOff();

	// Reset the palette
#ifdef HWRENDER
	if (rendermode == render_opengl)
		HWR_SetPaletteColor(0);
	else
#endif
	if (rendermode != render_none)
		V_SetPaletteLump("PLAYPAL");
}