/* * CL_Mumble_Update */ void CL_Mumble_Update( const vec3_t origin, const vec3_t forward, const vec3_t right, const vec3_t up, const char *identity ) { vec3_t mp, mf, mt; char context[256]; if( !cl_mumble->integer ) return; if( !identity ) return; VectorScale( origin, cl_mumble_scale->value, mp ); VectorSet( mf, forward[0], forward[2], forward[1] ); VectorSet( mt, up[0], up[2], up[1] ); if( cl_mumble->integer == 2 ) Com_Printf( "MumbleUpdate:\n%f, %f, %f\n%f, %f, %f\n%f, %f, %f", mp[0], mp[1], mp[2], mf[0], mf[1], mf[2], mt[0], mt[1], mt[2] ); mumble_update_coordinates( mp, mf, mt ); // for Mumble 1.2+ http://mumble.sourceforge.net/Link mumble_set_identity( identity ); // TODO: add team to context? Q_strncpyz( context, NET_AddressToString( &cls.serveraddress ), sizeof( context ) ); mumble_set_context( ( const unsigned char * )context, strlen( context ) + 1 ); }
void S_MumbleUpdate (const vec3_t origin, const vec3_t forward, const vec3_t right, const vec3_t up) { if (!s_env.initialized) return; if (!snd_mumble->integer) return; vec3_t mp, mf, mt; VectorScale(origin, snd_mumble_scale->value, mp); VectorSet(mf, forward[0], forward[2], forward[1]); VectorSet(mt, up[0], up[2], up[1]); if (snd_mumble->integer == 2) Com_Printf("S_MumbleUpdate:\n%f, %f, %f\n%f, %f, %f\n%f, %f, %f", mp[0], mp[1], mp[2], mf[0], mf[1], mf[2], mt[0], mt[1], mt[2]); mumble_update_coordinates(mp, mf, mt); #if 0 const unsigned int playerNum = CL_GetPlayerNum(); mumble_set_identity(CL_PlayerGetName(playerNum)); #endif char context[256]; if (snd_mumble_alltalk->integer) Q_strncpyz(context, "*", sizeof(context)); else Q_strncpyz(context, va("%i", cls.team), sizeof(context)); mumble_set_context(context, strlen(context) + 1); }