Lathain Valtiel Posted August 17, 2006 Share Posted August 17, 2006 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? Link to comment Share on other sites More sharing options...
stubert Posted August 17, 2006 Share Posted August 17, 2006 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 Link to comment Share on other sites More sharing options...
ensiform Posted August 17, 2006 Share Posted August 17, 2006 clothes color is already handled in ClientUserinfoChanged... char_color_red, char_color_green, char_color_green. and its CVAR_USERINFO not CVAR_CLIENTINFO Link to comment Share on other sites More sharing options...
razorace Posted August 17, 2006 Share Posted August 17, 2006 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. Link to comment Share on other sites More sharing options...
ensiform Posted August 17, 2006 Share Posted August 17, 2006 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. Link to comment Share on other sites More sharing options...
razorace Posted August 17, 2006 Share Posted August 17, 2006 buffer overflow? Where at? Which file/line number? Link to comment Share on other sites More sharing options...
ensiform Posted August 18, 2006 Share Posted August 18, 2006 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. Link to comment Share on other sites More sharing options...
razorace Posted August 18, 2006 Share Posted August 18, 2006 Ok, I added the fix to the UI_ParseScriptedSaber function, but I'm not sure what you mean by the ui_saber.c stuff. Link to comment Share on other sites More sharing options...
ensiform Posted August 18, 2006 Share Posted August 18, 2006 might be easier to discuss this on aim. Link to comment Share on other sites More sharing options...
razorace Posted August 18, 2006 Share Posted August 18, 2006 good point. I'll try to catch you the next time you're online. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.