|
|
 |
08-17-2006, 02:02 PM
|
#1
|
|
Ex-Angel
Join Date: Jul 2002
Posts: 929
|
Receiving the value of a cvar from a client
I'm horrifically new to Q3 coding, but yeah.
Let's say for the sake of argument that I made a new cvar named 'cg_string'.
How do I make it so that I could get clients to send the value of 'cg_string' to other clients for use in certain client-side functions? You know, similarly to how we receive the R, G, and B values of their clothing or the color of their saber?
|
|
you may:
quote & reply,
|
08-17-2006, 03:29 PM
|
#2
|
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
|
one of the cvar flags will keep it updated to the other clients
it's like CVAR_CLIENTINFO or some ****
you'll also have to add some other **** too but it's been to long for me to remember
someone else will know
|
|
you may:
quote & reply,
|
08-17-2006, 03:56 PM
|
#3
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
clothes color is already handled in ClientUserinfoChanged...
char_color_red, char_color_green, char_color_green.
and its CVAR_USERINFO not CVAR_CLIENTINFO 
|
|
you may:
quote & reply,
|
08-17-2006, 04:02 PM
|
#4
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Well, it's not that simple since client cvar data isn't directly communicated between players. Its gotta be processed by the server and then added to the player's configstring stuff. Look at the rgbsaber code in the OJP code to see an example of how it's done.
In addition, code3arena is a great resource for cvar related stuff.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
08-17-2006, 04:08 PM
|
#5
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
by the way razor, that client fix for buffer overflow for rgb sabers also applies to the UI, i believe you forgot to fix the UI code.
|
|
you may:
quote & reply,
|
08-17-2006, 04:40 PM
|
#6
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
buffer overflow? Where at? Which file/line number?
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
08-17-2006, 09:24 PM
|
#7
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
See rv1.36 for cg_players.c
That must also be applied for ui_main.c and i think some stuff in ui_saber.c needs cleaning up too.
|
|
you may:
quote & reply,
|
08-18-2006, 02:56 AM
|
#8
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Ok, I added the fix to the UI_ParseScriptedSaber function, but I'm not sure what you mean by the ui_saber.c stuff.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
08-18-2006, 01:40 PM
|
#9
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
might be easier to discuss this on aim.
|
|
you may:
quote & reply,
|
08-18-2006, 02:12 PM
|
#10
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
good point. I'll try to catch you the next time you're online.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Forum Jump
|
|
|
|
|
|