Hi again,

The reason why I want sv_voiceenable be known by clients is that I want to
display or not the "voice" column in the scoreboard panel.

In clientscoreboardpanel.cpp, there are many things related to "voice"
enablement in the scoreboard panel. I know that many things must be put in
hl2mpscoreboardpanel.cpp and it is what I did.
My problem is related to image in a listpanel (m_pPlayerList). I get images
(speaker1, speaker2...) from hl1 (gfx/vgui). Then I used vtex to turn them
to .vtf.
My vmt files are all like this:
"UnlitGeneric"
{
        // Original shader: BaseTimesVertexColorAlphaBlendNoOverbright
        "$translucent" 1
        "$basetexture" "vgui\speaker1"
        "$vertexcolor" 1
        "$vertexalpha" 1
        "$no_fullbright" 0
        "$ignorez" 1
}

My problem is that images are not displayed properly. There are like 'blur'.
It is impossible to understand it is a voice icon. We can only see a
transparent white box.

I use "imageList->AddImage(scheme()->GetImage("speaker1", true));" to load
image.
I execute the code to adapt it to my resolution:
        for (int i = 0; i < imageList->GetImageCount(); i++ )
        {
                int wide, tall;
                imageList->GetImage(i)->GetSize(wide, tall);
                
imageList->GetImage(i)->SetSize(scheme()->GetProportionalScaledValueEx(
GetScheme(),wide), scheme()->GetProportionalScaledValueEx(
GetScheme(),tall));
        }
I set imagelist to my playerlist : m_pPlayerList->SetImageList(imageList,
false);

And I set the keyvalue properly to return the good image index to display. I
don't understand why it doesn't show the image properly.

Any idea ?

From: "Janek Le_Vert" <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [hlcoders] sv_voiceenable
Date: Mon, 13 Aug 2007 14:35:51 +0200

Ben,

Thank you so much. It is exactly what I was looking for.
sv_voiceenable is server-side only but I wanted client to know if server is
enabling voice or not.


From: "Ben 'amogan' K." <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: [hlcoders] sv_voiceenable
Date: Mon, 13 Aug 2007 14:15:28 +0200

I'm not sure whether you are trying to do this with a server plugin or a
mod but you could use

cvar->FindVar("sv_voiceenable")

to get the cvar. Not sure if you would have to include some more
files/classes when working with a plugin though and it would also just
give you access to the server-side value if I'm not mistaken.
But then again isn't sv_voiceenable just a server-side-only cvar anyway?
:P

- Ben K.


Janek Le_Vert wrote:
Hi all,

I would like to know (server side and client side) value of
sv_voiceenable.
My first try was to decalre a extern ConVar sv_voiceenable and send its
value in a message to clients but compiler was not able to link
sv_voiceenable as sv_voiceenable is not part of the dll.

Second try was to see if I can get this information client side using
CVoiceStatus* GetClientVoiceMgr(); but I don't find usefull method in
here.

Then I had a look at CVoiceGameMgr* GetVoiceGameMgr(); but didn't find
what
I was expecting server side.

Do you know how I can grab value of sv_voiceenable ?

Thank you in advance for your help.

_________________________________________________________________
Windows Live Messenger sur i-mode™ : dialoguez avec vos amis depuis votre
mobile comme sur PC ! http://mobile.live.fr/messenger/bouygues/


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_________________________________________________________________
Avec Windows Live OneCare éliminez tous les virus de votre PC !
http://www.windowslive.fr/liveonecare/default.asp


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


_________________________________________________________________
Découvrez le Blog heroic Fantaisy d'Eragon!
http://eragon-heroic-fantasy.spaces.live.com/


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to