]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merged master into Lyberta/StandaloneOverkillWeapons.
authorLyberta <lyberta@lyberta.net>
Wed, 16 Aug 2017 03:10:50 +0000 (06:10 +0300)
committerLyberta <lyberta@lyberta.net>
Wed, 16 Aug 2017 03:10:50 +0000 (06:10 +0300)
1  2 
qcsrc/client/view.qc
qcsrc/common/stats.qh
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/server/client.qc
qcsrc/server/defs.qh

diff --combined qcsrc/client/view.qc
index c779734562f7b574f56898736e7e2bb3436f193b,e4f38b24c2d145e917765d4ee725f171feff083b..0cf3b302f5300cd2ab4ab62e6c68e43fbce9e148
@@@ -1,5 -1,7 +1,7 @@@
  #include "view.qh"
  
+ #include "autocvars.qh"
+ #include "miscfunctions.qh"
  #include "announcer.qh"
  #include "hud/_mod.qh"
  #include "mapvoting.qh"
  #include <common/stats.qh>
  #include <common/triggers/target/music.qh>
  #include <common/teams.qh>
+ #include <common/wepent.qh>
  
  #include <common/weapons/weapon/tuba.qh>
  
  #include <common/vehicles/all.qh>
  #include <common/weapons/_all.qh>
 +#include <common/mutators/mutator/overkill/okvortex.qh>
  #include <common/viewloc.qh>
  #include <common/minigames/cl_minigames.qh>
  #include <common/minigames/cl_minigames_hud.qh>
@@@ -468,7 -470,7 +471,7 @@@ vector GetCurrentFov(float fov
                {
                        entity wepent = viewmodels[slot];
                        if(wepent.switchweapon == wepent.activeweapon)
 -                      if((wepent.activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (wepent.activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary))) // do NOT use switchweapon here
 +                      if((wepent.activeweapon == WEP_VORTEX && !WEP_CVAR(vortex, secondary)) || (wepent.activeweapon == WEP_RIFLE && !WEP_CVAR(rifle, secondary)) || (wepent.activeweapon == WEP_OVERKILL_VORTEX && !WEP_CVAR(okvortex, secondary))) // do NOT use switchweapon here
                                zoomdir += button_attack2;
                }
        }
@@@ -660,7 -662,6 +663,7 @@@ float TrueAimCheck(entity wepent
                case WEP_MORTAR: // toss curve
                        return SHOTTYPE_HITWORLD;
                case WEP_VORTEX:
 +              case WEP_OVERKILL_VORTEX:
                case WEP_VAPORIZER:
                        mv = MOVE_NORMAL;
                        break;
@@@ -1185,10 -1186,6 +1188,10 @@@ void HUD_Crosshair(entity this
                                vortex_charge = STAT(VORTEX_CHARGE);
                                vortex_chargepool = STAT(VORTEX_CHARGEPOOL);
  
 +                              float okvortex_charge, okvortex_chargepool;
 +                              okvortex_charge = STAT(OVERKILL_VORTEX_CHARGE);
 +                              okvortex_chargepool = STAT(OVERKILL_VORTEX_CHARGEPOOL);
 +
                                float arc_heat = STAT(ARC_HEAT);
  
                                if(vortex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
                                }
 +                              else if (autocvar_crosshair_ring && (wepent.activeweapon == WEP_OVERKILL_VORTEX) && okvortex_charge && autocvar_crosshair_ring_vortex)
 +                              {
 +                                      if (okvortex_chargepool || use_vortex_chargepool) {
 +                                              use_vortex_chargepool = 1;
 +                                              ring_inner_value = okvortex_chargepool;
 +                                      } else {
 +                                              vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * okvortex_charge;
 +                                              ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (okvortex_charge - vortex_charge_movingavg), 1);
 +                                      }
 +
 +                                      ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha;
 +                                      ring_inner_rgb = eX * autocvar_crosshair_ring_vortex_inner_color_red + eY * autocvar_crosshair_ring_vortex_inner_color_green + eZ * autocvar_crosshair_ring_vortex_inner_color_blue;
 +                                      ring_inner_image = "gfx/crosshair_ring_inner.tga";
 +
 +                                      // draw the outer ring to show the current charge of the weapon
 +                                      ring_value = okvortex_charge;
 +                                      ring_alpha = autocvar_crosshair_ring_vortex_alpha;
 +                                      ring_rgb = wcross_color;
 +                                      ring_image = "gfx/crosshair_ring_nexgun.tga";
 +                              }
                                else if (autocvar_crosshair_ring && wepent.activeweapon == WEP_MINE_LAYER && WEP_CVAR(minelayer, limit) && autocvar_crosshair_ring_minelayer)
                                {
                                        ring_value = bound(0, STAT(LAYED_MINES) / WEP_CVAR(minelayer, limit), 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
diff --combined qcsrc/common/stats.qh
index d43b4333cb9a3e45a56e57cff18570ac50496456,94e408d7f614be2d769fc229625a390bfd357ba0..d5060429d1dde6c8aef82e70799ac8caca7c40ab
@@@ -1,6 -1,7 +1,7 @@@
  #pragma once
  
  #ifdef SVQC
+ #include <server/autocvars.qh>
  #include <server/client.qh>
  #endif
  
@@@ -85,11 -86,9 +86,11 @@@ REGISTER_STAT(WEAPON_CLIPLOAD, int
  REGISTER_STAT(WEAPON_CLIPSIZE, int)
  
  REGISTER_STAT(VORTEX_CHARGE, float)
 +REGISTER_STAT(OVERKILL_VORTEX_CHARGE, float)
  REGISTER_STAT(LAST_PICKUP, float)
  REGISTER_STAT(HUD, int)
  REGISTER_STAT(VORTEX_CHARGEPOOL, float)
 +REGISTER_STAT(OVERKILL_VORTEX_CHARGEPOOL, float)
  REGISTER_STAT(HIT_TIME, float)
  REGISTER_STAT(DAMAGE_DEALT_TOTAL, int)
  REGISTER_STAT(TYPEHIT_TIME, float)
@@@ -353,7 -352,7 +354,7 @@@ noref int autocvar_cl_gunalign
  .int cvar_cl_gunalign;
  REPLICATE(cvar_cl_gunalign, int, "cl_gunalign");
  #endif
- REGISTER_STAT(GUNALIGN, int, this.cvar_cl_gunalign)
+ REGISTER_STAT(GUNALIGN, int)
  #ifdef SVQC
  SPECTATE_COPYFIELD(_STAT(GUNALIGN))
  #endif
index 3d2bb7d097c8945dfc6c5918eeac9c6f62bf8eaf,3644c1357e3fa2517d7a6de28832c14f2de0c394..e0d2e327ffb3cd6a1bf6c812d6b2301466fb28c0
@@@ -1,73 -1,17 +1,17 @@@
  #include "shotgun.qh"
- #ifndef IMPLEMENTATION
- CLASS(Shotgun, Weapon)
- /* ammotype  */ ATTRIB(Shotgun, ammo_field, .int, ammo_shells);
- /* impulse   */ ATTRIB(Shotgun, impulse, int, 2);
- /* flags     */ ATTRIB(Shotgun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_TYPE_MELEE_SEC);
- /* rating    */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
- /* color     */ ATTRIB(Shotgun, wpcolor, vector, '0.5 0.25 0');
- /* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
- #ifdef GAMEQC
- /* model     */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
- #endif
- /* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
- /* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
- /* wepimg    */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
- /* refname   */ ATTRIB(Shotgun, netname, string, "shotgun");
- /* wepname   */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
- #define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, alt_animtime, float, SEC) \
-               P(class, prefix, alt_refire, float, SEC) \
-               P(class, prefix, ammo, float, PRI) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, bullets, float, PRI) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, melee_delay, float, SEC) \
-               P(class, prefix, melee_multihit, float, SEC) \
-               P(class, prefix, melee_nonplayerdamage, float, SEC) \
-               P(class, prefix, melee_no_doubleslap, float, SEC) \
-               P(class, prefix, melee_range, float, SEC) \
-               P(class, prefix, melee_swing_side, float, SEC) \
-               P(class, prefix, melee_swing_up, float, SEC) \
-               P(class, prefix, melee_time, float, SEC) \
-               P(class, prefix, melee_traces, float, SEC) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, reload_ammo, float, NONE) \
-         P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, solidpenetration, float, PRI) \
-               P(class, prefix, spread, float, PRI) \
-         P(class, prefix, switchdelay_drop, float, NONE) \
-         P(class, prefix, switchdelay_raise, float, NONE) \
-         P(class, prefix, weaponreplace, string,NONE) \
-         P(class, prefix, weaponstartoverride, float, NONE) \
-         P(class, prefix, weaponstart, float, NONE) \
-         P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-     W_PROPS(X, Shotgun, shotgun)
- #undef X
- ENDCLASS(Shotgun)
- REGISTER_WEAPON(SHOTGUN, shotgun, NEW(Shotgun));
  
- #endif
- #ifdef IMPLEMENTATION
  #ifdef SVQC
  spawnfunc(weapon_shotgun) { weapon_defaultspawnfunc(this, WEP_SHOTGUN); }
  
 -void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float isprimary)
 +void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float isprimary, float ammocount, float damage, float bullets, float spread, float solidpenetration, float force)
  {
 -      W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(shotgun, ammo), weaponentity);
 +      W_DecreaseAmmo(thiswep, actor, ammocount, weaponentity);
  
 -      W_SetupShot(actor, weaponentity, true, 5, SND_SHOTGUN_FIRE, ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), WEP_CVAR_PRI(shotgun, damage) * WEP_CVAR_PRI(shotgun, bullets));
 -      for(int sc = 0;sc < WEP_CVAR_PRI(shotgun, bullets);sc = sc + 1)
 -              fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR_PRI(shotgun, spread), WEP_CVAR_PRI(shotgun, solidpenetration), WEP_CVAR_PRI(shotgun, damage), WEP_CVAR_PRI(shotgun, force), WEP_SHOTGUN.m_id, 0);
 +      W_SetupShot(actor, weaponentity, true, 5, SND_SHOTGUN_FIRE, ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), damage * bullets);
 +      for(int sc = 0;sc < bullets;sc = sc + 1)
 +              fireBullet(actor, weaponentity, w_shotorg, w_shotdir, spread, solidpenetration, damage, force, WEP_SHOTGUN.m_id, 0);
  
 -      Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, WEP_CVAR_PRI(shotgun, ammo));
 +      Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, ammocount);
  
        // casing code
        if(autocvar_g_casings >= 1)
@@@ -208,13 -152,7 +152,13 @@@ void W_Shotgun_Attack3_Frame2(Weapon th
        }
  
        sound(actor, CH_WEAPON_SINGLE, SND_Null, VOL_BASE, ATTN_NORM); // kill previous sound
 -      W_Shotgun_Attack(WEP_SHOTGUN, actor, weaponentity, true); // actually is secondary, but we trick the last shot into playing full reload sound
 +      W_Shotgun_Attack(WEP_SHOTGUN, actor, weaponentity, true,
 +              WEP_CVAR_PRI(shotgun, ammo),
 +              WEP_CVAR_PRI(shotgun, damage),
 +              WEP_CVAR_PRI(shotgun, bullets),
 +              WEP_CVAR_PRI(shotgun, spread),
 +              WEP_CVAR_PRI(shotgun, solidpenetration),
 +              WEP_CVAR_PRI(shotgun, force)); // actually is secondary, but we trick the last shot into playing full reload sound
        weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), w_ready);
  }
  void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, .entity weaponentity, int fire)
                return;
        }
  
 -      W_Shotgun_Attack(WEP_SHOTGUN, actor, weaponentity, false);
 +      W_Shotgun_Attack(WEP_SHOTGUN, actor, weaponentity, false,
 +              WEP_CVAR_PRI(shotgun, ammo),
 +              WEP_CVAR_PRI(shotgun, damage),
 +              WEP_CVAR_PRI(shotgun, bullets),
 +              WEP_CVAR_PRI(shotgun, spread),
 +              WEP_CVAR_PRI(shotgun, solidpenetration),
 +              WEP_CVAR_PRI(shotgun, force));
        weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), W_Shotgun_Attack3_Frame2);
  }
  
@@@ -246,7 -178,6 +190,7 @@@ METHOD(Shotgun, wr_aim, void(entity thi
      else
          PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false);
  }
 +
  METHOD(Shotgun, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
  {
      if(WEP_CVAR(shotgun, reload_ammo) && actor.(weaponentity).clip_load < WEP_CVAR_PRI(shotgun, ammo)) // forced reload
              {
                  if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(shotgun, animtime)))
                  {
 -                    W_Shotgun_Attack(thiswep, actor, weaponentity, true);
 +                    W_Shotgun_Attack(thiswep, actor, weaponentity, true,
 +                                              WEP_CVAR_PRI(shotgun, ammo),
 +                                              WEP_CVAR_PRI(shotgun, damage),
 +                                              WEP_CVAR_PRI(shotgun, bullets),
 +                                              WEP_CVAR_PRI(shotgun, spread),
 +                                              WEP_CVAR_PRI(shotgun, solidpenetration),
 +                                              WEP_CVAR_PRI(shotgun, force));
                      actor.(weaponentity).shotgun_primarytime = time + WEP_CVAR_PRI(shotgun, refire) * W_WeaponRateFactor(actor);
                      weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(shotgun, animtime), w_ready);
                  }
              {
                  if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_SEC(shotgun, alt_animtime)))
                  {
 -                    W_Shotgun_Attack(thiswep, actor, weaponentity, false);
 +                    W_Shotgun_Attack(thiswep, actor, weaponentity, false,
 +                                              WEP_CVAR_PRI(shotgun, ammo),
 +                                              WEP_CVAR_PRI(shotgun, damage),
 +                                              WEP_CVAR_PRI(shotgun, bullets),
 +                                              WEP_CVAR_PRI(shotgun, spread),
 +                                              WEP_CVAR_PRI(shotgun, solidpenetration),
 +                                              WEP_CVAR_PRI(shotgun, force));
                      actor.(weaponentity).shotgun_primarytime = time + WEP_CVAR_SEC(shotgun, alt_refire) * W_WeaponRateFactor(actor);
                      weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), W_Shotgun_Attack3_Frame1);
                  }
@@@ -360,4 -279,3 +304,3 @@@ METHOD(Shotgun, wr_impacteffect, void(e
  }
  
  #endif
- #endif
diff --combined qcsrc/server/client.qc
index d8a8c3c52e5f4aeeffa9274870b324eb5b2eaedd,b0eb75ae41bd1c1954a3bdad671924a5133b947c..1b8ee24ce72fa1f2619f414106815d4d5655c9c8
@@@ -1,5 -1,8 +1,8 @@@
  #include "client.qh"
  
+ #include <server/defs.qh>
+ #include <server/miscfunctions.qh>
+ #include <common/effects/all.qh>
  #include "anticheat.qh"
  #include "impulse.qh"
  #include "player.qh"
@@@ -56,8 -59,6 +59,8 @@@
  
  #include "../lib/warpzone/server.qh"
  
 +#include <common/mutators/mutator/overkill/okvortex.qh>
 +
  STATIC_METHOD(Client, Add, void(Client this, int _team))
  {
      ClientConnect(this);
@@@ -153,7 -154,7 +156,7 @@@ void ClientData_Touch(entity e
        CS(e).clientdata.SendFlags = 1;
  
        // make it spectatable
-       FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != e && IS_SPEC(it) && it.enemy == e, LAMBDA(CS(it).clientdata.SendFlags = 1));
+       FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != e && IS_SPEC(it) && it.enemy == e, { CS(it).clientdata.SendFlags = 1; });
  }
  
  void SetSpectatee(entity this, entity spectatee);
@@@ -661,7 -662,7 +664,7 @@@ void PutPlayerInServer(entity this
        target_voicescript_clear(this);
  
        // reset fields the weapons may use
-       FOREACH(Weapons, true, LAMBDA(
+       FOREACH(Weapons, true, {
                it.wr_resetplayer(it, this);
                        // reload all reloadable weapons
                if (it.spawnflags & WEP_FLAG_RELOADABLE) {
                                this.(weaponentity).weapon_load[it.m_id] = it.reloading_ammo;
                        }
                }
-       ));
+       });
  
        {
                string s = spot.target;
@@@ -1726,8 -1727,6 +1729,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;
@@@ -2013,13 -2012,13 +2016,13 @@@ int nJoinAllowed(entity this, entity ig
        // TODO simplify this
        int totalClients = 0;
        int currentlyPlaying = 0;
-       FOREACH_CLIENT(true, LAMBDA(
+       FOREACH_CLIENT(true, {
                if(it != ignore)
                        ++totalClients;
                if(IS_REAL_CLIENT(it))
                if(IS_PLAYER(it) || it.caplayer)
                        ++currentlyPlaying;
-       ));
+       });
  
        float free_slots = 0;
        if (!autocvar_g_maxplayers)
@@@ -2312,7 -2311,7 +2315,7 @@@ void ObserverThink(entity this
                                TRANSMUTE(Spectator, this);
                        }
                } else {
-                       int preferred_movetype = ((!PHYS_INPUT_BUTTON_USE(this) ? this.cvar_cl_clippedspectating : !this.cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);
+                       int preferred_movetype = ((!PHYS_INPUT_BUTTON_USE(this) ? CS(this).cvar_cl_clippedspectating : !CS(this).cvar_cl_clippedspectating) ? MOVETYPE_FLY_WORLDONLY : MOVETYPE_NOCLIP);
                        set_movetype(this, preferred_movetype);
                }
        } else {
@@@ -2450,6 -2449,9 +2453,9 @@@ Called every frame for each client befo
  .float last_vehiclecheck;
  void PlayerPreThink (entity this)
  {
+       STAT(GUNALIGN, this) = CS(this).cvar_cl_gunalign; // TODO
+       STAT(MOVEVARS_CL_TRACK_CANJUMP, this) = CS(this).cvar_cl_movement_track_canjump;
        WarpZone_PlayerPhysics_FixVAngle(this);
  
        if (frametime) {
        }
  
        // version nagging
-       if (CS(this).version_nagtime && this.cvar_g_xonoticversion && time > CS(this).version_nagtime) {
+       if (CS(this).version_nagtime && CS(this).cvar_g_xonoticversion && time > CS(this).version_nagtime) {
          CS(this).version_nagtime = 0;
-         if (strstrofs(this.cvar_g_xonoticversion, "git", 0) >= 0 || strstrofs(this.cvar_g_xonoticversion, "autobuild", 0) >= 0) {
+         if (strstrofs(CS(this).cvar_g_xonoticversion, "git", 0) >= 0 || strstrofs(CS(this).cvar_g_xonoticversion, "autobuild", 0) >= 0) {
              // git client
          } else if (strstrofs(autocvar_g_xonoticversion, "git", 0) >= 0 || strstrofs(autocvar_g_xonoticversion, "autobuild", 0) >= 0) {
              // git server
-             Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_VERSION_BETA, autocvar_g_xonoticversion, this.cvar_g_xonoticversion);
+             Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_VERSION_BETA, autocvar_g_xonoticversion, CS(this).cvar_g_xonoticversion);
          } else {
-             int r = vercmp(this.cvar_g_xonoticversion, autocvar_g_xonoticversion);
+             int r = vercmp(CS(this).cvar_g_xonoticversion, autocvar_g_xonoticversion);
              if (r < 0) { // old client
-                 Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_VERSION_OUTDATED, autocvar_g_xonoticversion, this.cvar_g_xonoticversion);
+                 Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_VERSION_OUTDATED, autocvar_g_xonoticversion, CS(this).cvar_g_xonoticversion);
              } else if (r > 0) { // old server
-                 Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_VERSION_OLD, autocvar_g_xonoticversion, this.cvar_g_xonoticversion);
+                 Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_VERSION_OLD, autocvar_g_xonoticversion, CS(this).cvar_g_xonoticversion);
              }
          }
      }
                this.last_vehiclecheck = time + 1;
        }
  
-       if(!this.cvar_cl_newusekeysupported) // FIXME remove this - it was a stupid idea to begin with, we can JUST use the button
+       if(!CS(this).cvar_cl_newusekeysupported) // FIXME remove this - it was a stupid idea to begin with, we can JUST use the button
        {
                if(PHYS_INPUT_BUTTON_USE(this) && !CS(this).usekeypressed)
                        PlayerUseKey(this);
diff --combined qcsrc/server/defs.qh
index 3f561a193cb01ca0c3f9ab5186d703a8c00d0e5c,d9f614357ce4a6b2bc240247965c36f353c3b413..fc9f53e61bb47b5ab15aa53ed2bde9f7ca680637
@@@ -162,7 -162,7 +162,7 @@@ float default_weapon_alpha
  .float cvar_cl_clippedspectating;
  .float cvar_cl_autoscreenshot;
  .float cvar_cl_jetpack_jump;
- .float cvar_cl_movement_track_canjump = _STAT(MOVEVARS_CL_TRACK_CANJUMP);
+ .float cvar_cl_movement_track_canjump;
  .float cvar_cl_newusekeysupported;
  
  .string cvar_g_xonoticversion;
@@@ -327,9 -327,6 +327,9 @@@ float client_cefc_accumulatortime
  .float vortex_charge = _STAT(VORTEX_CHARGE);
  .float vortex_charge_rottime;
  .float vortex_chargepool_ammo = _STAT(VORTEX_CHARGEPOOL);
 +.float okvortex_charge = _STAT(OVERKILL_VORTEX_CHARGE);
 +.float okvortex_charge_rottime;
 +.float okvortex_chargepool_ammo = _STAT(OVERKILL_VORTEX_CHARGEPOOL);
  .float hagar_load = _STAT(HAGAR_LOAD);
  
  .int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab