Raised This Month: $ Target: $400
 0% 

To hear own voice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 05-14-2015 , 15:16   Re: To hear own voice
Reply With Quote #1

Well, i was wrong, loopback doesn't put yourself automatickly at ban list, this is something else.

Here is what i found at voice_status.cpp:
PHP Code:
void CVoiceStatus::UpdateSpeakerStatusint entindexqboolean bTalking )
{
    
cvar_t *pVoiceLoopback NULL;

    if ( !
m_pParentPanel || !*m_pParentPanel )
    {
        return;
    }

    if ( 
gEngfuncs.pfnGetCvarFloat"voice_clientdebug" ) )
    {
        
char msg[256];
        
_snprintfmsgsizeofmsg ), "CVoiceStatus::UpdateSpeakerStatus: ent %d talking = %d\n"entindexbTalking );
        
gEngfuncs.pfnConsolePrintmsg );
    }

    
int iLocalPlayerIndex gEngfuncs.GetLocalPlayer()->index;

    
// Is it the local player talking?
    
if ( entindex == -)
    {
        
m_bTalking = !!bTalking;
        if( 
bTalking )
        {
            
// Enable voice for them automatically if they try to talk.
            
gEngfuncs.pfnClientCmd"voice_modenable 1" );
        }
        
        
// now set the player index to the correct index for the local player
        // this will allow us to have the local player's icon flash in the scoreboard
        
entindex iLocalPlayerIndex;

        
pVoiceLoopback gEngfuncs.pfnGetCvarPointer"voice_loopback" );
    }
    else if ( 
entindex == -)
    {
        
m_bServerAcked = !!bTalking;
    }

    if ( 
entindex >= && entindex <= VOICE_MAX_PLAYERS )
    {
        
int iClient entindex 1;
        if ( 
iClient )
        {
            return;
        }

        
CVoiceLabel *pLabel FindVoiceLabeliClient );
        if ( 
bTalking )
        {
            
m_VoicePlayers[iClient] = true;
            
m_VoiceEnabledPlayers[iClient] = true;

            
// If we don't have a label for this guy yet, then create one.
            
if ( !pLabel )
            {
                
// if this isn't the local player (unless they have voice_loopback on)
                
if ( ( entindex != iLocalPlayerIndex ) || ( pVoiceLoopback && pVoiceLoopback->value ) )
                {
                    if ( 
pLabel GetFreeVoiceLabel() )
                    {
                        
// Get the name from the engine.
                        
hud_player_info_t info;
                        
memset( &info0sizeofinfo ) );
                        
gEngfuncs.pfnGetPlayerInfoentindex, &info );

                        
char paddedName[512];
                        
_snprintfpaddedNamesizeofpaddedName ), "%s   "info.name );

                        
int color[3];
                        
m_pHelper->GetPlayerTextColorentindexcolor );

                        if ( 
pLabel->m_pBackground )
                        {
                            
pLabel->m_pBackground->setBgColorcolor[0], color[1], color[2], 135 );
                            
pLabel->m_pBackground->setParent( *m_pParentPanel );
                            
pLabel->m_pBackground->setVisiblem_pHelper->CanShowSpeakerLabels() );
                        }

                        if ( 
pLabel->m_pLabel )
                        {
                            
pLabel->m_pLabel->setFgColor255255255);
                            
pLabel->m_pLabel->setBgColor000255 );
                            
pLabel->m_pLabel->setText"%s"paddedName );
                        }
                        
                        
pLabel->m_clientindex iClient;
                    }
                }
            }
        }
        else
        {
            
m_VoicePlayers[iClient] = false;

            
// If we have a label for this guy, kill it.
            
if ( pLabel )
            {
                
pLabel->m_pBackground->setVisiblefalse );
                
pLabel->m_clientindex = -1;
            }
        }
    }

    
RepositionLabels();

Well, i don't have enough knowledge to tell you if it is possible or not to do what you want since my orpheu level / moduling level is still low. Yet, let's wait someone experient with this stuff to tell us if you can do something about this or if you will have to move on.
__________________
Jhob94 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode