e = edict_num(self.cnt + 1);
if(IS_REAL_CLIENT(e))
{
- WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
- WriteByte(MSG_BROADCAST, TE_CSQC_PINGPLREPORT);
+ WriteHeader(MSG_BROADCAST, TE_CSQC_PINGPLREPORT);
WriteByte(MSG_BROADCAST, self.cnt);
WriteShort(MSG_BROADCAST, max(1, e.ping));
WriteByte(MSG_BROADCAST, ceil(e.ping_packetloss * 255));
}
else
{
- WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
- WriteByte(MSG_BROADCAST, TE_CSQC_PINGPLREPORT);
+ WriteHeader(MSG_BROADCAST, TE_CSQC_PINGPLREPORT);
WriteByte(MSG_BROADCAST, self.cnt);
WriteShort(MSG_BROADCAST, 0);
WriteByte(MSG_BROADCAST, 0);
void SetDefaultAlpha()
{
- if(autocvar_g_running_guns)
- {
- default_player_alpha = -1;
- default_weapon_alpha = +1;
- }
- else if(g_cloaked)
- {
- default_player_alpha = autocvar_g_balance_cloaked_alpha;
- default_weapon_alpha = default_player_alpha;
- }
- else
+ if (!MUTATOR_CALLHOOK(SetDefaultAlpha))
{
default_player_alpha = autocvar_g_player_alpha;
if(default_player_alpha == 0)
entity randomseed;
bool RandomSeed_Send(entity this, entity to, int sf)
{
- WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
WriteShort(MSG_ENTITY, self.cnt);
return true;
}
WepSet_AddStat_InMap();
addstat(STAT_SWITCHWEAPON, AS_INT, switchweapon);
addstat(STAT_SWITCHINGWEAPON, AS_INT, switchingweapon);
+ addstat(STAT_WEAPON_NEXTTHINK, AS_FLOAT, weapon_nextthink);
addstat(STAT_GAMESTARTTIME, AS_FLOAT, stat_game_starttime);
addstat(STAT_ROUNDSTARTTIME, AS_FLOAT, stat_round_starttime);
addstat(STAT_ALLOW_OLDVORTEXBEAM, AS_INT, stat_allow_oldvortexbeam);
e.takedamage = DAMAGE_NO;
for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
{
- if(e.weaponentity[slot])
+ .entity weaponentity = weaponentities[slot];
+ if(e.(weaponentity))
{
- e.weaponentity[slot].effects = EF_NODRAW;
- if (e.weaponentity[slot].weaponentity[slot])
- e.weaponentity[slot].weaponentity[slot].effects = EF_NODRAW;
+ e.(weaponentity).effects = EF_NODRAW;
+ if (e.(weaponentity).weaponchild)
+ e.(weaponentity).weaponchild.effects = EF_NODRAW;
}
}
if(IS_REAL_CLIENT(e))
}
// clear the .winning flags
-void ClearWinners(void)
+void ClearWinners()
{
entity head;
FOR_EACH_PLAYER(head)