Raised This Month: $ Target: $400
 0% 

Finding function name from hlds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 07-15-2014 , 22:28   Finding function name from hlds
Reply With Quote #1

How can I know which function from hlds is called when I execute "+showscores" command?
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-15-2014 , 22:52   Re: Finding function name from hlds
Reply With Quote #2

The button IN_SCORE is sent when it is held down. I do not believe there is a function called as the scoreboard is rendered by the client.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 07-16-2014 , 09:49   Re: Finding function name from hlds
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
The button IN_SCORE is sent when it is held down. I do not believe there is a function called as the scoreboard is rendered by the client.
Are the names of the scorebar already in the client's memory when you send the command?
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-16-2014 , 14:51   Re: Finding function name from hlds
Reply With Quote #4

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
Are the names of the scorebar already in the client's memory when you send the command?
Everything. Team, scores, all those have a relationship (SVC_CLIENTDATA, TeamInfo msgid, ScoreInfo msgid).

There's no reason to client send a request EVERYTIME when +gamescore button is sent, that would be so overpowered if 32 clients are spamming the command. So, guess by yourself, data is sent to client when it needs to change.

Also, +gamescores is never sent to server.

** When a client uses a command, if is not present on client's game cmd list, it will be sent to the server. (example: "say" and "say_team")
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-16-2014 , 16:17   Re: Finding function name from hlds
Reply With Quote #5

Quote:
Originally Posted by meTaLiCroSS View Post
Also, +gamescores is never sent to server.

** When a client uses a command, if is not present on client's game cmd list, it will be sent to the server. (example: "say" and "say_team")
Really? So this is the reason I am unable to find any commands using a sniffer? Or are they sent as text if they are on the "client's game cmd list"?
Is there anywhere I can find out more about this?
__________________

Last edited by Black Rose; 07-16-2014 at 16:24.
Black Rose is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 07-16-2014 , 17:02   Re: Finding function name from hlds
Reply With Quote #6

Generally everything that has +/- in front of it is client side.
__________________
In Flames we trust!
Nextra is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-16-2014 , 17:34   Re: Finding function name from hlds
Reply With Quote #7

Quote:
Originally Posted by Black Rose View Post
Really? So this is the reason I am unable to find any commands using a sniffer? Or are they sent as text if they are on the "client's game cmd list"?
Is there anywhere I can find out more about this?
When playing, if you change any cl cvar like "cl_minmodels" to any value, server will never know about it, it will be a waste of bandwidth.

Also, there are some commands from client that when are sent to server (guessing isn't recognized from client) are handled by the "engine". On OSHLDS:

PHP Code:
static const char clcommands[] = { "status""god""notarget""fly""name",
                                     
"noclip""kill""pause""spawn""new",
                                     
"sendres""dropclient""kick""ping",
                                     
"dlfile""nextdl""setinfo""showinfo",
                                     
"sendents""fullupdate""setpause",
                                     
"unpause"NULL }; 
(guess fullupdate is now not handled by the engine) it is handled, but pfnClientCommand called manually for making "mod" handle it.
If isn't a command from these, they are sent by pfnClientCommand to the "mod".

That's handled by SV_ParseStringCommand.

SV_ReadPackets -> SV_ExecuteClientMessage -> SV_ParseStringCommand (game routine)

About your question about finding more about this, i've been just searching long time ago. I've semidecompiled engine and mod and search by myself how some things works, and also I must thank HLSDK and OSHLDS which are really helpful in this case.

Sorry for my english anyway.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross

Last edited by meTaLiCroSS; 07-16-2014 at 17:36.
meTaLiCroSS is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-16-2014 , 17:30   Re: Finding function name from hlds
Reply With Quote #8

I misunderstood. I thought he meant all commands.
__________________
Black Rose 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 21:09.


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