if(self.alivetime)
{
if(!warmup_stage)
- PlayerStats_Event(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
+ PS_GR_P_ADDVAL(self, PLAYERSTATS_ALIVETIME, time - self.alivetime);
self.alivetime = 0;
}
stuffcmd(e, "cl_cmd settemp cl_prydoncursor_notrace 0\n");
if(autocvar_sv_gentle)
stuffcmd(e, "cl_cmd settemp cl_gentle 1\n");
- /*
- * we no longer need to stuff this. Remove this comment block if you feel
- * 2.3 and higher (or was it 2.2.3?) don't need these any more
- stuffcmd(e, strcat("cl_gravity ", ftos(autocvar_sv_gravity), "\n"));
- stuffcmd(e, strcat("cl_movement_accelerate ", ftos(autocvar_sv_accelerate), "\n"));
- stuffcmd(e, strcat("cl_movement_friction ", ftos(autocvar_sv_friction), "\n"));
- stuffcmd(e, strcat("cl_movement_maxspeed ", ftos(autocvar_sv_maxspeed), "\n"));
- stuffcmd(e, strcat("cl_movement_airaccelerate ", ftos(autocvar_sv_airaccelerate), "\n"));
- stuffcmd(e, strcat("cl_movement_maxairspeed ", ftos(autocvar_sv_maxairspeed), "\n"));
- stuffcmd(e, strcat("cl_movement_stopspeed ", ftos(autocvar_sv_stopspeed), "\n"));
- stuffcmd(e, strcat("cl_movement_jumpvelocity ", ftos(autocvar_sv_jumpvelocity), "\n"));
- stuffcmd(e, strcat("cl_movement_stepheight ", ftos(autocvar_sv_stepheight), "\n"));
- stuffcmd(e, strcat("set cl_movement_friction_on_land ", ftos(autocvar_sv_friction_on_land), "\n"));
- stuffcmd(e, strcat("set cl_movement_airaccel_qw ", ftos(autocvar_sv_airaccel_qw), "\n"));
- stuffcmd(e, strcat("set cl_movement_airaccel_sideways_friction ", ftos(autocvar_sv_airaccel_sideways_friction), "\n"));
- stuffcmd(e, "cl_movement_edgefriction 1\n");
- */
}
float PlayerInIDList(entity p, string idlist)
player_count = 0;
}
+ if(IS_REAL_CLIENT(self)) { PlayerStats_PlayerBasic_CheckUpdate(self); }
+
PlayerScore_Attach(self);
ClientData_Attach();
accuracy_init(self);
self.playerid = (playerid_last = playerid_last + 1);
- PlayerStats_AddEvent(sprintf("kills-%d", self.playerid));
+ PlayerStats_GameReport_AddEvent(sprintf("kills-%d", self.playerid));
if(IS_BOT_CLIENT(self))
- PlayerStats_AddPlayer(self);
+ PlayerStats_GameReport_AddPlayer(self);
if(autocvar_sv_eventlog)
GameLogEcho(strcat(":join:", ftos(self.playerid), ":", ftos(num_for_edict(self)), ":", ((IS_REAL_CLIENT(self)) ? self.netaddress : "bot"), ":", self.netname));
// Wazat's grappling hook
SetGrappleHookBindings();
+ // Jetpack binds
+ stuffcmd(self, "alias +jetpack +button10\n");
+ stuffcmd(self, "alias -jetpack -button10\n");
+
// get version info from player
stuffcmd(self, "cmd clientversion $gameversion\n");
return;
}
- if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
+ PlayerStats_GameReport_FinalizePlayer(self);
- PlayerStats_AddGlobalInfo(self);
+ if(IS_PLAYER(self)) { pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); }
CheatShutdownClient();
mina = autocvar_g_balance_armor_regenstable;
limith = autocvar_g_balance_health_limit;
limita = autocvar_g_balance_armor_limit;
-
+
max_mod = regen_mod_max;
regen_mod = regen_mod_regen;
rot_mod = regen_mod_rot;
return 1;
}
-
float SpectateSet()
{
if(self.enemy.classname != "player")
MUTATOR_CALLHOOK(PlayerUseKey);
}
+float isInvisibleString(string s)
+{
+ float i, n, c;
+ s = strdecolorize(s);
+ for((i = 0), (n = strlen(s)); i < n; ++i)
+ {
+ c = str2chr(s, i);
+ switch(c)
+ {
+ case 0:
+ case 32: // space
+ break;
+ case 192: // charmap space
+ if (!autocvar_utf8_enable)
+ break;
+ return FALSE;
+ case 160: // space in unicode fonts
+ case 0xE000 + 192: // utf8 charmap space
+ if (autocvar_utf8_enable)
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
/*
=============
PlayerPreThink
zoomstate_set = 0;
- if(self.netname_previous != self.netname)
- {
+ // Savage: Check for nameless players
+ if (isInvisibleString(self.netname)) {
+ string new_name = strzone(strcat("Player@", self.netaddress));
+ if(autocvar_sv_eventlog)
+ GameLogEcho(strcat(":name:", ftos(self.playerid), ":", new_name));
+ if(self.netname_previous)
+ strunzone(self.netname_previous);
+ self.netname_previous = strzone(new_name);
+ self.netname = self.netname_previous;
+ // stuffcmd(self, strcat("name ", self.netname, "\n"));
+ } else if(self.netname_previous != self.netname) {
if(autocvar_sv_eventlog)
GameLogEcho(strcat(":name:", ftos(self.playerid), ":", self.netname));
if(self.netname_previous)
self.clip_load = self.clip_size = 0;
}
-float isInvisibleString(string s)
-{
- float i, n, c;
- s = strdecolorize(s);
- for((i = 0), (n = strlen(s)); i < n; ++i)
- {
- c = str2chr(s, i);
- switch(c)
- {
- case 0:
- case 32: // space
- break;
- case 192: // charmap space
- if (!autocvar_utf8_enable)
- break;
- return FALSE;
- case 160: // space in unicode fonts
- case 0xE000 + 192: // utf8 charmap space
- if (autocvar_utf8_enable)
- break;
- default:
- return FALSE;
- }
- }
- return TRUE;
-}
-
/*
=============
PlayerPostThink
.float idlekick_lasttimeleft;
void PlayerPostThink (void)
{
- // Savage: Check for nameless players
- if (isInvisibleString(self.netname)) {
- self.netname = "Player";
- stuffcmd(self, strcat("name ", self.netname, substring(ftos(random()), 2, -1), "\n"));
- }
-
if(sv_maxidle > 0 && frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
if(IS_PLAYER(self) || sv_maxidle_spectatorsareidle)
{
}
*/
- //pointparticles(particleeffectnum("machinegun_impact"), self.origin + self.view_ofs + '0 0 7', '0 0 0', 1);
-
if(self.waypointsprite_attachedforcarrier)
WaypointSprite_UpdateHealth(self.waypointsprite_attachedforcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));