Esempio n. 1
0
//
//  D_DoomLoop
//
void D_DoomLoop (void)
{
    while (1)
    {
        try
        {
            TryRunTics (); // will run at least one tic

            if (!connected)
                CL_RequestConnectInfo();

            // [RH] Use the consoleplayer's camera to update sounds
            S_UpdateSounds (listenplayer().camera);	// move positional sounds
            S_UpdateMusic();	// play another chunk of music

            // Update display, next frame, with current state.
            D_Display ();
        }
        catch (CRecoverableError &error)
        {
            Printf_Bold ("\n%s\n", error.GetMsg().c_str());

            CL_QuitNetGame ();

            G_ClearSnapshots ();

            DThinker::DestroyAllThinkers();

            players.clear();

            gameaction = ga_fullconsole;
        }
    }
}
Esempio n. 2
0
/*
* S_Update
*/
static void S_Update( void )
{
	S_UpdateMusic();
	
	S_UpdateStreams();
	

	s_volume->modified = qfalse; // Checked by src and stream
	s_musicvolume->modified = qfalse; // Checked by stream and music

	if( s_doppler->modified )
	{
		if( s_doppler->value > 0.0f )
			qalDopplerFactor( s_doppler->value );
		else
			qalDopplerFactor( 0.0f );
		s_doppler->modified = qfalse;
	}

	if( s_sound_velocity->modified )
	{
		qalDopplerVelocity( s_sound_velocity->value > 0.0f ? s_sound_velocity->value : 0.0f );
		if( qalSpeedOfSound )
			qalSpeedOfSound( s_sound_velocity->value > 0.0f ? s_sound_velocity->value : 0.0f );
		s_sound_velocity->modified = qfalse;
	}
}
Esempio n. 3
0
/*
* S_Update
*/
void S_Update( const vec3_t origin, const vec3_t velocity, const vec3_t forward, const vec3_t right, const vec3_t up, qboolean avidump )
{
	float orientation[6];

	orientation[0] = forward[0];
	orientation[1] = forward[1];
	orientation[2] = forward[2];
	orientation[3] = up[0];
	orientation[4] = up[1];
	orientation[5] = up[2];

	qalListenerfv( AL_POSITION, origin );
	qalListenerfv( AL_VELOCITY, velocity );
	qalListenerfv( AL_ORIENTATION, orientation );

	S_UpdateSources();
	S_UpdateStream();
	S_UpdateMusic();

	s_volume->modified = qfalse; // Checked by src and stream
	s_musicvolume->modified = qfalse; // Checked by stream and music

	if( s_doppler->modified )
	{
		if( s_doppler->value > 0.0f )
			qalDopplerFactor( s_doppler->value );
		else
			qalDopplerFactor( 0.0f );
		s_doppler->modified = qfalse;
	}

	if( s_sound_velocity->modified )
	{
		qalDopplerVelocity( s_sound_velocity->value > 0.0f ? s_sound_velocity->value : 0.0f );
		if( qalSpeedOfSound )
			qalSpeedOfSound( s_sound_velocity->value > 0.0f ? s_sound_velocity->value : 0.0f );
		s_sound_velocity->modified = qfalse;
	}
}