Exemplo n.º 1
0
/*
==================
Host_Reconnect_f

This command causes the client to wait for the signon messages again.
This is sent just before a server changes levels
==================
*/
static void Host_Reconnect_f (void)
{
	R_ClearParticles ();	//jfm: for restarts which didn't use to clear parts.

	if (oem.integer && cl.intermission == 9)	// Matrox m3D bundle version's ending
	{
		CL_Disconnect();
		return;
	}

	if (cls.demoplayback)	// cross-map demo playback fix from Baker
		return;

	SCR_BeginLoadingPlaque ();
	cls.signon = 0;		// need new connection messages
}
Exemplo n.º 2
0
void G_InitNew (const char *mapname)
{
    size_t i;

    // [RH] Remove all particles
    R_ClearParticles ();

    for (i = 0; i < players.size(); i++)
    {
        players[i].mo = AActor::AActorPtr();
        players[i].camera = AActor::AActorPtr();
        players[i].attacker = AActor::AActorPtr();
    }

    if (!savegamerestore)
        G_ClearSnapshots ();

    // [RH] Mark all levels as not visited
    if (!savegamerestore)
    {
        for (i = 0; i < wadlevelinfos.size(); i++)
            wadlevelinfos[i].flags &= ~LEVEL_VISITED;

        for (i = 0; LevelInfos[i].mapname[0]; i++)
            LevelInfos[i].flags &= ~LEVEL_VISITED;
    }

    cvar_t::UnlatchCVars ();

    if (sv_skill > sk_nightmare)
        sv_skill.Set (sk_nightmare);
    else if (sv_skill < sk_baby)
        sv_skill.Set (sk_baby);

    cvar_t::UnlatchCVars ();

    if (paused)
    {
        paused = false;
        S_ResumeSound ();
    }

    // If were in chasecam mode, clear out // [Toke - fix]
    if ((consoleplayer().cheats & CF_CHASECAM))
    {
        consoleplayer().cheats &= ~CF_CHASECAM;
    }

    // [RH] If this map doesn't exist, bomb out
    if (W_CheckNumForName (mapname) == -1)
    {
        I_Error ("Could not find map %s\n", mapname);
    }

    if (sv_skill == sk_nightmare || sv_monstersrespawn)
        respawnmonsters = true;
    else
        respawnmonsters = false;

    bool wantFast = sv_fastmonsters || (sv_skill == sk_nightmare);
    if (wantFast != isFast)
    {
        if (wantFast)
        {
            for (i=S_SARG_RUN1 ; i<=S_SARG_PAIN2 ; i++)
                states[i].tics >>= 1;
            mobjinfo[MT_BRUISERSHOT].speed = 20*FRACUNIT;
            mobjinfo[MT_HEADSHOT].speed = 20*FRACUNIT;
            mobjinfo[MT_TROOPSHOT].speed = 20*FRACUNIT;
        }
        else
        {
            for (i=S_SARG_RUN1 ; i<=S_SARG_PAIN2 ; i++)
                states[i].tics <<= 1;
            mobjinfo[MT_BRUISERSHOT].speed = 15*FRACUNIT;
            mobjinfo[MT_HEADSHOT].speed = 10*FRACUNIT;
            mobjinfo[MT_TROOPSHOT].speed = 10*FRACUNIT;
        }
        isFast = wantFast;
    }