Fixes
"client VM warning: VM_CL_getstati: index(-1) is >=MAX_CL_STATS(256) or <0"
often appearing when connecting, with my hud_panel_ammo config.
It could also have been fixed by checking for (ammoType == 0) as well as
(ammoType == RES_NONE) but a many-cases fix is better than a
special-case fix.
NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew)
{
make_pure(this);
- float newspectatee_status;
+ int newspectatee_status;
int f = ReadByte();
// -1 - observing
// 0 - playing
// >0 - id of spectated player
-float spectatee_status;
+int spectatee_status = -1; ///< the -1 disables HUD panels before CSQC receives necessary data
float spectatee_status_changed_time;
#define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1)