X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qc;h=2e2116c3496a40e1cafdf39e97918ef79f3b4569;hp=45e71d5591389cdeaef0d000d44d240c16a707b1;hb=2b58aea4138b82cd34f025835393a47f0619e56f;hpb=b033eeb472dde42a24c46120ea2db8591ef5213c diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 45e71d559..2e2116c34 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -61,6 +61,8 @@ #include "../lib/warpzone/server.qh" +#include + STATIC_METHOD(Client, Add, void(Client this, int _team)) { ClientConnect(this); @@ -270,7 +272,7 @@ void PutObserverInServer(entity this) if (this.alivetime) { if (!warmup_stage) - PS_GR_P_ADDVAL(this, PLAYERSTATS_ALIVETIME, time - this.alivetime); + PlayerStats_GameReport_Event_Player(this, PLAYERSTATS_ALIVETIME, time - this.alivetime); this.alivetime = 0; } @@ -873,19 +875,19 @@ Called when a client types 'kill' in the console .float clientkill_nexttime; void ClientKill_Now_TeamChange(entity this) { - if(CS(this).killindicator_teamchange == -1) + if(this.killindicator_teamchange == -1) { JoinBestTeam( this, false, true ); } - else if(CS(this).killindicator_teamchange == -2) + else if(this.killindicator_teamchange == -2) { if(blockSpectators) Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime); PutObserverInServer(this); } else - SV_ChangeTeam(this, CS(this).killindicator_teamchange - 1); - CS(this).killindicator_teamchange = 0; + SV_ChangeTeam(this, this.killindicator_teamchange - 1); + this.killindicator_teamchange = 0; } void ClientKill_Now(entity this) @@ -893,7 +895,7 @@ void ClientKill_Now(entity this) if(this.vehicle) { vehicles_exit(this.vehicle, VHEF_RELEASE); - if(!CS(this).killindicator_teamchange) + if(!this.killindicator_teamchange) { this.vehicle_health = -1; Damage(this, this, this, 1 , DEATH_KILL.m_id, this.origin, '0 0 0'); @@ -905,7 +907,7 @@ void ClientKill_Now(entity this) this.killindicator = NULL; - if(CS(this).killindicator_teamchange) + if(this.killindicator_teamchange) ClientKill_Now_TeamChange(this); if (!IS_SPEC(this) && !IS_OBSERVER(this) && MUTATOR_CALLHOOK(ClientKill_Now, this) == false) @@ -970,7 +972,7 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change, return; killtime = M_ARGV(1, float); - CS(this).killindicator_teamchange = targetteam; + this.killindicator_teamchange = targetteam; if(!this.killindicator) { @@ -1756,6 +1758,8 @@ void SpectateCopy(entity this, entity spectatee) this.weapons = spectatee.weapons; this.vortex_charge = spectatee.vortex_charge; this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo; + this.okvortex_charge = spectatee.okvortex_charge; + this.okvortex_chargepool_ammo = spectatee.okvortex_chargepool_ammo; this.hagar_load = spectatee.hagar_load; this.arc_heat_percent = spectatee.arc_heat_percent; this.minelayer_mines = spectatee.minelayer_mines;