]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
authorLyberta <lyberta@lyberta.net>
Sun, 2 Apr 2017 08:25:05 +0000 (11:25 +0300)
committerLyberta <lyberta@lyberta.net>
Sun, 2 Apr 2017 08:25:05 +0000 (11:25 +0300)
1  2 
qcsrc/server/client.qc

diff --combined qcsrc/server/client.qc
index 18987a2b5432b08fc84e9fdbd6fcee43b2ee807e,168ca84968c5e6fc75422b18fc777880874b3c12..2e2e92cd58e2b240069147bdc12d4b5ff5bbd728
@@@ -56,8 -56,6 +56,8 @@@
  
  #include "../lib/warpzone/server.qh"
  
 +#include <common/mutators/mutator/overkill/okvortex.qh>
 +
  STATIC_METHOD(Client, Add, void(Client this, int _team))
  {
      ClientConnect(this);
@@@ -716,7 -714,7 +716,7 @@@ void PutClientInServer(entity this
                for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                {
                        .entity weaponentity = weaponentities[slot];
-                       if(slot == 0)
+                       if(slot == 0 || autocvar_g_weaponswitch_debug == 1)
                                this.(weaponentity).m_switchweapon = w_getbestweapon(this, weaponentity);
                        else
                                this.(weaponentity).m_switchweapon = WEP_Null;
@@@ -1698,8 -1696,6 +1698,8 @@@ void SpectateCopy(entity this, entity s
        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;
@@@ -2525,13 -2521,7 +2525,13 @@@ void PlayerPreThink (entity this
                {
                        .entity weaponentity = weaponentities[slot];
                        if (WEP_CVAR(vortex, charge_rot_rate) && this.(weaponentity).vortex_charge > WEP_CVAR(vortex, charge_limit) && this.(weaponentity).vortex_charge_rottime < time)
 +                      {
                                this.(weaponentity).vortex_charge = bound(WEP_CVAR(vortex, charge_limit), this.(weaponentity).vortex_charge - WEP_CVAR(vortex, charge_rot_rate) * frametime / W_TICSPERFRAME, 1);
 +                      }
 +                      if (WEP_CVAR(okvortex, charge_rot_rate) && this.(weaponentity).okvortex_charge > WEP_CVAR(okvortex, charge_limit) && this.(weaponentity).okvortex_charge_rottime < time)
 +                      {
 +                              this.(weaponentity).okvortex_charge = bound(WEP_CVAR(okvortex, charge_limit), this.(weaponentity).okvortex_charge - WEP_CVAR(okvortex, charge_rot_rate) * frametime / W_TICSPERFRAME, 1);
 +                      }
                }
  
                if (frametime) player_anim(this);