Jump to content

Home

Why can't I add a new variable to forcedata_t?


Vruki Salet

Recommended Posts

Yeah, unless your doing some compiler stuff you can't really add things to q_shared.c or q_shared.h. This is why, you know when you edit b_pmove.c it changes for both the server and client projects? q_shared.h is a file not just for those two but also unreleased code for the rendering and network code and other engine stuff. So if server and client runs one version of q_shared.h and the renderer and network code runs another it really messes stuff up.

Link to comment
Share on other sites

Well, there are a couple of options....

 

1. you can use some of the unused/rarely used data slots in the playerstate. namely, some of the slots in the stats array aren't used that can be used.

 

2. use ext_data/mp/*_overrides.txt files to change the size of the entitystate/ playerstate to include the user floats/ints. Please note that is will make your mod incompatible with basejka servers and such, since it changes the size of the game packets.

Link to comment
Share on other sites

Quoth Tinny:

 

"...but also unreleased code f..."

 

Ah there's my answer. I forgot about that aspect of things.

 

& Quoth Razorace:

 

"...use some of the unused/rarely used data slots..."

 

Yeah that's what I'll do if I really think it's worth it but I'll probly hold off since there're are only so many slots.

 

Thanks for the overerides tip. I never thought of using those and they could come in handy someday.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...