Page 1 of 1

entityState ints are 8 bit?

Posted: Fri May 20, 2011 7:41 pm
by Eraser
I've been using various integers that are part of the entityState_s struct to pass data to the client from the server through events (tempEntity). It appears that all ints like eventParm and generic1 are truncated to 8 bits and if you put a value higher than 255 in them, they'll end up as 0 on the client's side.

Is this something I'm doing wrong or am I right in my assumption here. If I'm right about this, is there any way to send proper (32-bit) ints to the client?

Re: entityState ints are 8 bit?

Posted: Fri May 20, 2011 8:22 pm
by ^misantropia^
It depends on the field, some are send with higher fidelity than others. Have a look at the playerStateFields[] array in qcommon/msg.c - you probably need to break up the int in two 16 bit words. Have you tried slotting your data into the stats array?

https://github.com/ariya/ioquake3/blob/ ... sg.c#L1130