X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_client.qc;h=01092c886fd1fb97fe58ec8bfa716367964315ac;hb=3f2caafc69a1f64fc52e2e763c9f73989bac558d;hp=143b2d18b82f6396948a08785d28e52b45b47c88;hpb=b03338e49b3b16ec20c59a9809abe16bebcd29ce;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 143b2d18b..01092c886 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -165,7 +165,7 @@ void PutObserverInServer (void) 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; } @@ -967,23 +967,6 @@ void FixClientCvars(entity e) 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) @@ -1047,6 +1030,8 @@ void ClientConnect (void) player_count = 0; } + if(IS_REAL_CLIENT(self)) { PlayerStats_PlayerBasic_CheckUpdate(self); } + PlayerScore_Attach(self); ClientData_Attach(); accuracy_init(self); @@ -1125,10 +1110,10 @@ void ClientConnect (void) 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)); @@ -1155,6 +1140,10 @@ void ClientConnect (void) // 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"); @@ -1235,9 +1224,9 @@ void ClientDisconnect (void) 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(); @@ -1573,7 +1562,7 @@ void player_regen (void) 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; @@ -1767,7 +1756,6 @@ float SpectateUpdate() return 1; } - float SpectateSet() { if(self.enemy.classname != "player") @@ -2638,8 +2626,6 @@ void PlayerPostThink (void) } */ - //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));