if(newspectatee_status != spectatee_status)
{
float i;
- // clear the weapon accuracy stats
- for(i = WEP_FIRST; i <= WEP_LAST; ++i) {
- weapon_hits[i] = 0;
- weapon_fired[i] = 0;
- }
// clear race stuff
race_laptime = 0;
psrandom(s);
}
+void Ent_ReadAccuracy(void)
+{
+ float sf, f, w, b;
+ sf = ReadInt24_t();
+ if(sf == 0)
+ {
+ for(w = 0; w <= WEP_LAST - WEP_FIRST; ++w)
+ weapon_accuracy[w] = -1;
+ return;
+ }
+
+ for(w = 0, f = 1; w <= WEP_LAST - WEP_FIRST; ++w, f *= 2)
+ {
+ if(sf & f)
+ {
+ b = ReadByte();
+ if(b == 0)
+ weapon_accuracy[w] = -1;
+ else
+ weapon_accuracy[w] = (b - 1.0) / 254.0;
+ }
+ }
+}
+
// CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.
// The only parameter reflects if the entity is "new" to the client, meaning it just came into the client's PVS.
void Ent_RadarLink();
case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;
case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
+ case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
default:
error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));
break;
g_weaponswitchdelay = ReadByte() / 255.0;
- g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord();
- g_balance_grenadelauncher_secondary_bouncestop = ReadCoord();
+ g_balance_grenadelauncher_bouncefactor = ReadCoord();
+ g_balance_grenadelauncher_bouncestop = ReadCoord();
+ g_balance_electro_secondary_bouncefactor = ReadCoord();
+ g_balance_electro_secondary_bouncestop = ReadCoord();
nex_scope = !ReadByte();
campingrifle_scope = !ReadByte();
+ serverflags = ReadByte();
+
if(!postinit)
PostInit();
}