GangsterAngel Posted October 28, 2005 Posted October 28, 2005 how can you add ints to the ->PS struct that the server sends to the client?
Jufa Posted October 28, 2005 Posted October 28, 2005 add those ints to playerStat structure. i saw tutorial about that somewhere... i'll try to look for it.
Wudan Posted October 28, 2005 Posted October 28, 2005 Er, there's some unused stuff in the playerstate struct. Razor would know.
GangsterAngel Posted October 28, 2005 Author Posted October 28, 2005 add those ints to playerStat structure. i saw tutorial about that somewhere... i'll try to look for it. diffrent for Persistant , it sends the Persistent struct to the client , meening it has to be programed to recive and send each INT in the struct.... which is in the engine i belive.
CerberuS_21 Posted October 28, 2005 Posted October 28, 2005 Do a search for "userInt1" - I think that should bring up what you are looking for. As Wudan mentioned, Raven included some variables specifically for mod makers - this is one of them.
RenegadeOfPhunk Posted October 29, 2005 Posted October 29, 2005 Also, be sure to pay attention to the two .txt files in base\ext_data\MP ... netf_overrides.txt psf_overrides.txt You may well have to alter one or both of these files, depending on which value slot(s) your trying to use. An explination of what you need to do is at the top of both files.
ensiform Posted October 29, 2005 Posted October 29, 2005 you do know you cannot modify the playerState or entityState structs right, without the engine?
RenegadeOfPhunk Posted October 29, 2005 Posted October 29, 2005 I'm not talking about adding new data values to the playerState or entityState structs. Hence the term value 'slot'. BUt those text files determine how much of those structs get passed around. Your code can all be set-up correctly, but if you haven't enabled those values your using to actually get transmitted using those .txt files, that data won't get communicated, regardless of whether it's set into the structure(s) or not... ...I learn't that the hard way after a lot of head scratching, and looking at the screen thinking 'WTF! But the code is right '
razorace Posted October 30, 2005 Posted October 30, 2005 GangsterAngel, what is this going to be used for? Something that only the individual client needs to know or something that all the clients need to know about everyone?
GangsterAngel Posted October 30, 2005 Author Posted October 30, 2005 just the one client , i worked a way to do it with cg_servercmds.c
razorace Posted October 31, 2005 Posted October 31, 2005 err, ok. Well, my suggestion is that you first determine how you're going to use the data you're going to send. Namely, how often does the client need this data and how often does this data change? Secondly, how important is this data? Is it important enough to force this game to require a client side component? P.S. cg_servercmds.c? What did you do there?
GangsterAngel Posted October 31, 2005 Author Posted October 31, 2005 its just for a flashbang , ( the time it started , and how long it lasts for ) just used a server command to send the time and endtime.
ensiform Posted October 31, 2005 Posted October 31, 2005 why dont u use one of the other generic values thats already sent over ps? or even pmove ?
razorace Posted October 31, 2005 Posted October 31, 2005 Well, for a flashbang you really don't need to send client data for that. What is the start/endtimes for? Are they dynamic or simply for rendering the flash on the client side?
ensiform Posted November 1, 2005 Posted November 1, 2005 q3f/etf has flashbang grenades, and what about TC:E ET? im sure they could help you with some ideas maybe?
GangsterAngel Posted November 1, 2005 Author Posted November 1, 2005 start and endtime is so the clientside knows how dark to make the clients screen. and what "BUZZ" sound to play
GangsterAngel Posted November 1, 2005 Author Posted November 1, 2005 q3f/etf has flashbang grenades, and what about TC:E ET? im sure they could help you with some ideas maybe? ive had it working perfectly for 2 or 3 days now, but thanx anyway. http://img301.imageshack.us/img301/9284/thermaltypes1xq.jpg
razorace Posted November 1, 2005 Posted November 1, 2005 Ok, well, this should be communicated as a game event (see EV_FALL for an example) instead of as part of the playerstate. Just an FYI for the future.
GangsterAngel Posted November 1, 2005 Author Posted November 1, 2005 playervents are sent to all clients though , im sure cg_servercmds is less laggy. since thats the method they use to show client menus. since only that one client needs to know. although u make a point with EV_FALL.
Tinny Posted November 2, 2005 Posted November 2, 2005 GangsterAngel, your mod looks amazing (except for the 16 fps part ). Keep up the good work .
razorace Posted November 2, 2005 Posted November 2, 2005 playervents are sent to all clients though , im sure cg_servercmds is less laggy. since thats the method they use to show client menus. since only that one client needs to know. although u make a point with EV_FALL. Maybe I'm mistaken but don't all players need to see the flash of a flash bang going off? Also, which client menus are you referring to? The siege menus?
GangsterAngel Posted November 2, 2005 Author Posted November 2, 2005 seige menus and radio menu . all players dont need to know , it only tells the people it effects in G_FlashbangDamage() [ which is like G_RadiusDamage ] and the POPPING ( eplision ) effect is just a effect file played by the server. along with the sound.
GangsterAngel Posted November 2, 2005 Author Posted November 2, 2005 ohh and its not normaly 16 fps,, just becausei hadded restarted in like 4 days , its normaly 40-60 , and my GFX card sux lol
razorace Posted November 2, 2005 Posted November 2, 2005 seige menus and radio menu . all players dont need to know , it only tells the people it effects in G_FlashbangDamage() [ which is like G_RadiusDamage ] and the POPPING ( eplision ) effect is just a effect file played by the server. along with the sound. Ah, I gotcha. I misunderstood and thought you were doing it weird.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.