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?
entityState ints are 8 bit?
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: entityState ints are 8 bit?
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
https://github.com/ariya/ioquake3/blob/ ... sg.c#L1130