.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   Hostname in Scoreboard (HUD) (http://forums.bots-united.com/showthread.php?t=1579)

desNotes 03-05-2004 17:22

Hostname in Scoreboard (HUD)
 
When pressing the TAB key in HLDM, CS, etc. the scoreboard (HUD) comes up and gives the standings, pings, etc. and the hostname of the server. In the mod Ricochet, the hostname does not display. I've done a few bug fixes to the Ricochet code and some enhancements to the HLDM but can't seem to find where the hostname in HLDM gets sent to the HUD so I can add the code to the Ricochet side.

I am hoping I won't have to alter the client side at all but just send the hostname from the server. Anyone have an idea where I can locate the hostname info on HLDM and how it displays?

Thanks,

desNotes




Pierre-Marie Baty 03-05-2004 19:14

Re: Hostname in Scoreboard (HUD)
 
When you mean "hostname", I assume you mean the server name as reported in the HL server browser ?
If so, you might be interested in hacking around the pfnGetGameDescription() function (from the gamedll functions interface).

Lazy 03-05-2004 19:45

Re: Hostname in Scoreboard (HUD)
 
Heres why it won't show...
It seems that the ricochet server has removed the "ServerName" message, also, the client has ditched the message aswell.

Luckily, the code to display the server name is still there but is just idle.
What you need to do is register the "ServerName" network message ( Size as -1 ).
In CHalfLifeMultiplay::SendMOTDToClient ( or wherever you want to put it ) just send the ServerName message along with the server's "hostname" cvar value.
All you need to do is hook the message on the client ( The hook function is still there aswell ) and it should display.

desNotes 04-05-2004 00:07

Re: Hostname in Scoreboard (HUD)
 
Quote:

Originally Posted by Lazy
All you need to do is hook the message on the client ( The hook function is still there aswell ) and it should display.

I found the information in the server code but even if I change the client side, I then have to compile and redistribute the clients and there isn't enough interest for that.

thanks anyway,

desNotes


All times are GMT +2. The time now is 05:13.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.