lfnetwork.com mark read register faq members calendar

Thread: Receiving the value of a cvar from a client
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 08-17-2006, 02:02 PM   #1
Lathain Valtiel
Ex-Angel
 
Lathain Valtiel's Avatar
 
Join Date: Jul 2002
Posts: 929
LFN Staff Member 
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?


Kurgan's Meatgrinder (JA Server: 72.5.248.212:29070)

Player tested, Valtiel approved.

Valtiel approved downloads for Meatgrinder: http://strategy.jediknight.net/jka/downloads.shtml
Lathain Valtiel is offline   you may: quote & reply,
Old 08-17-2006, 03:29 PM   #2
stubert
 
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
stubert is offline   you may: quote & reply,
Old 08-17-2006, 03:56 PM   #3
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
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


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-17-2006, 04:02 PM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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
razorace is offline   you may: quote & reply,
Old 08-17-2006, 04:08 PM   #5
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
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.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-17-2006, 04:40 PM   #6
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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
razorace is offline   you may: quote & reply,
Old 08-17-2006, 09:24 PM   #7
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
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.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-18-2006, 02:56 AM   #8
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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
razorace is offline   you may: quote & reply,
Old 08-18-2006, 01:40 PM   #9
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
might be easier to discuss this on aim.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-18-2006, 02:12 PM   #10
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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
razorace is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Receiving the value of a cvar from a client

Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump


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

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.