]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/StandaloneOverkillWeapons
authorLyberta <lyberta@lyberta.net>
Fri, 16 Feb 2018 08:39:22 +0000 (11:39 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 16 Feb 2018 08:39:22 +0000 (11:39 +0300)
14 files changed:
qcsrc/client/view.qc
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/stats.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/arc.qh
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/common/wepent.qc
qcsrc/common/wepent.qh
qcsrc/server/client.qc
qcsrc/server/defs.qh
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/common.qh

index b022ce2d45d42bef1a1b251b4209d75bb24630ef..0bde0788d303b6ec276559a8777cb6bd9be9d540 100644 (file)
@@ -1193,34 +1193,29 @@ void HUD_Crosshair(entity this)
 
                                ring_scale = autocvar_crosshair_ring_size;
 
-                               float weapon_clipload, weapon_clipsize;
-                               weapon_clipload = STAT(WEAPON_CLIPLOAD);
-                               weapon_clipsize = STAT(WEAPON_CLIPSIZE);
-
-                               float vortex_charge, vortex_chargepool;
-                               vortex_charge = STAT(VORTEX_CHARGE);
-                               vortex_chargepool = STAT(VORTEX_CHARGEPOOL);
+                               entity wepent = viewmodels[0]; // TODO: unhardcode
 
-                               float oknex_charge, oknex_chargepool;
-                               oknex_charge = STAT(OVERKILL_NEX_CHARGE);
-                               oknex_chargepool = STAT(OVERKILL_NEX_CHARGEPOOL);
+                               int weapon_clipload = wepent.clip_load;
+                               int weapon_clipsize = wepent.clip_size;
 
-                               float arc_heat = STAT(ARC_HEAT);
+                               float arc_heat = wepent.arc_heat_percent;
+                               float vcharge = wepent.vortex_charge;
+                               float vchargepool = wepent.vortex_chargepool_ammo;
+                               float oknex_charge_ = wepent.oknex_charge;
+                               float oknex_chargepool_ = wepent.oknex_chargepool_ammo;
 
                                if(vortex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
-                                       vortex_charge_movingavg = vortex_charge;
-
-                               entity wepent = viewmodels[0]; // TODO: unhardcode
+                                       vortex_charge_movingavg = vcharge;
 
                                // handle the values
-                               if (autocvar_crosshair_ring && wepent.activeweapon == WEP_VORTEX && vortex_charge && autocvar_crosshair_ring_vortex) // ring around crosshair representing velocity-dependent damage for the vortex
+                               if (autocvar_crosshair_ring && wepent.activeweapon == WEP_VORTEX && vcharge && autocvar_crosshair_ring_vortex) // ring around crosshair representing velocity-dependent damage for the vortex
                                {
-                                       if (vortex_chargepool || use_vortex_chargepool) {
+                                       if (vchargepool || use_vortex_chargepool) {
                                                use_vortex_chargepool = 1;
-                                               ring_inner_value = vortex_chargepool;
+                                               ring_inner_value = vchargepool;
                                        } else {
-                                               vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * vortex_charge;
-                                               ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (vortex_charge - vortex_charge_movingavg), 1);
+                                               vortex_charge_movingavg = (1 - autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate) * vortex_charge_movingavg + autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate * vcharge;
+                                               ring_inner_value = bound(0, autocvar_crosshair_ring_vortex_currentcharge_scale * (vcharge - vortex_charge_movingavg), 1);
                                        }
 
                                        ring_inner_alpha = autocvar_crosshair_ring_vortex_inner_alpha;
@@ -1228,7 +1223,7 @@ void HUD_Crosshair(entity this)
                                        ring_inner_image = "gfx/crosshair_ring_inner.tga";
 
                                        // draw the outer ring to show the current charge of the weapon
-                                       ring_value = vortex_charge;
+                                       ring_value = vcharge;
                                        ring_alpha = autocvar_crosshair_ring_vortex_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring_nexgun.tga";
@@ -1255,14 +1250,14 @@ void HUD_Crosshair(entity this)
                                }
                                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.
+                                       ring_value = bound(0, wepent.minelayer_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.
                                        ring_alpha = autocvar_crosshair_ring_minelayer_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring.tga";
                                }
-                               else if (wepent.activeweapon == WEP_HAGAR && STAT(HAGAR_LOAD) && autocvar_crosshair_ring_hagar)
+                               else if (wepent.activeweapon == WEP_HAGAR && wepent.hagar_load && autocvar_crosshair_ring_hagar)
                                {
-                                       ring_value = bound(0, STAT(HAGAR_LOAD) / WEP_CVAR_SEC(hagar, load_max), 1);
+                                       ring_value = bound(0, wepent.hagar_load / WEP_CVAR_SEC(hagar, load_max), 1);
                                        ring_alpha = autocvar_crosshair_ring_hagar_alpha;
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring.tga";
index 545a6b4f6abe4ba6808a915833a62b966f2db4db..7f80268d8d7ddd9c4e49a1854262b24cace48cbd 100644 (file)
@@ -48,15 +48,15 @@ void W_RocketPropelledChainsaw_Think(entity this)
                return;
        }
 
-       this.cnt = vlen(this.velocity);
-       this.wait = this.cnt * sys_frametime;
-       this.pos1 = normalize(this.velocity);
+       float myspeed = vlen(this.velocity);
+       float myspeed_accel = myspeed * sys_frametime;
+       vector mydir = normalize(this.velocity);
 
-       tracebox(this.origin, this.mins, this.maxs, this.origin + this.pos1 * (2 * this.wait), MOVE_NORMAL, this);
+       tracebox(this.origin, this.mins, this.maxs, this.origin + mydir * (2 * myspeed_accel), MOVE_NORMAL, this);
        if(IS_PLAYER(trace_ent))
                Damage (trace_ent, this, this.realowner, WEP_CVAR_PRI(rpc, damage2), this.projectiledeathtype, this.origin, normalize(this.origin - other.origin) * WEP_CVAR_PRI(rpc, force));
 
-       this.velocity = this.pos1 * (this.cnt + (WEP_CVAR_PRI(rpc, speedaccel) * sys_frametime));
+       this.velocity = mydir * (myspeed + (WEP_CVAR_PRI(rpc, speedaccel) * sys_frametime));
 
        UpdateCSQCProjectile(this);
        this.nextthink = time;
@@ -105,7 +105,6 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep, entity actor, .entity wea
        SUB_SetFade (flash, time, 0.1);
        flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
        W_AttachToShotorg(actor, weaponentity, flash, '5 0 0');
-       missile.pos1 = missile.velocity;
 
        MUTATOR_CALLHOOK(EditProjectile, actor, missile);
 }
index 3b7311f6e9b21611aee4eeffb13a1796213111cc..69d3a4f583326714cc89f44f23fe2d097f3a993d 100644 (file)
@@ -73,7 +73,6 @@ REGISTER_STAT(GAMESTARTTIME, float, game_starttime)
 REGISTER_STAT(STRENGTH_FINISHED, float)
 REGISTER_STAT(INVINCIBLE_FINISHED, float)
 /** arc heat in [0,1] */
-REGISTER_STAT(ARC_HEAT, float)
 REGISTER_STAT(PRESSED_KEYS, int)
 /** this stat could later contain some other bits of info, like, more server-side particle config */
 REGISTER_STAT(ALLOW_OLDVORTEXBEAM, bool, autocvar_g_allow_oldvortexbeam)
@@ -82,20 +81,12 @@ REGISTER_STAT(NB_METERSTART, float)
 /** compressShotOrigin */
 REGISTER_STAT(SHOTORG, int)
 REGISTER_STAT(LEADLIMIT, float, autocvar_leadlimit)
-REGISTER_STAT(WEAPON_CLIPLOAD, int)
-REGISTER_STAT(WEAPON_CLIPSIZE, int)
 
-REGISTER_STAT(VORTEX_CHARGE, float)
-REGISTER_STAT(OVERKILL_NEX_CHARGE, float)
 REGISTER_STAT(LAST_PICKUP, float)
 REGISTER_STAT(HUD, int)
-REGISTER_STAT(VORTEX_CHARGEPOOL, float)
-REGISTER_STAT(OVERKILL_NEX_CHARGEPOOL, float)
 REGISTER_STAT(HIT_TIME, float)
 REGISTER_STAT(DAMAGE_DEALT_TOTAL, int)
 REGISTER_STAT(TYPEHIT_TIME, float)
-REGISTER_STAT(LAYED_MINES, int)
-REGISTER_STAT(HAGAR_LOAD, int)
 REGISTER_STAT(SUPERWEAPONS_FINISHED, float)
 REGISTER_STAT(VEHICLESTAT_HEALTH, int)
 REGISTER_STAT(VEHICLESTAT_SHIELD, int)
index 23e3dbcb2bc8d235e2921f45ab8803570bd0ea35..763a979dfe140915ad6c68fddc49953615ef6dc3 100644 (file)
@@ -87,7 +87,7 @@ float Arc_GetHeat_Percent(entity player, .entity weaponentity)
 }
 void Arc_Player_SetHeat(entity player, .entity weaponentity)
 {
-       player.arc_heat_percent = Arc_GetHeat_Percent(player, weaponentity);
+       player.(weaponentity).arc_heat_percent = Arc_GetHeat_Percent(player, weaponentity);
        //dprint("Heat: ",ftos(player.arc_heat_percent*100),"%\n");
 }
 
@@ -565,7 +565,7 @@ void Arc_Smoke(entity actor, .entity weaponentity)
        vector smoke_origin = w_shotorg + actor.velocity*frametime;
        if ( actor.arc_overheat > time )
        {
-               if ( random() < actor.arc_heat_percent )
+               if ( random() < actor.(weaponentity).arc_heat_percent )
                        Send_Effect(EFFECT_ARC_SMOKE, smoke_origin, '0 0 0', 1 );
                if ( PHYS_INPUT_BUTTON_ATCK(actor) || PHYS_INPUT_BUTTON_ATCK2(actor) )
                {
index 4ec2d4edc98a1a59053f8a7ac8346c9f5a7bd52e..187e5840257149e270f929961f13a7ed2412a7ea 100644 (file)
@@ -112,7 +112,7 @@ const int ARC_SF_LOCALMASK =   ARC_SF_START | ARC_SF_WANTDIR | ARC_SF_BEAMDIR;
 .float beam_heat; // (beam) amount of heat produced
 .float arc_overheat; // (dropped arc/player) time during which it's too hot
 .float arc_cooldown; // (dropped arc/player) cooling speed
-.float arc_heat_percent = _STAT(ARC_HEAT);
+.float arc_heat_percent;
 .float arc_smoke_sound;
 #endif
 #ifdef CSQC
index ff2e74539ce83faf9acb719b3faf4c26cd376bc7..b7c4c8c16a96015e8ea976c7b5bc8d36dc1f9d18 100644 (file)
@@ -247,9 +247,6 @@ void W_Hagar_Attack2_Load_Release(entity actor, .entity weaponentity)
        weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(hagar, load_animtime), w_ready);
        actor.(weaponentity).hagar_loadstep = time + WEP_CVAR_SEC(hagar, refire) * W_WeaponRateFactor(actor);
        actor.(weaponentity).hagar_load = 0;
-
-       if(weaponslot(weaponentity) == 0)
-               actor.hagar_load = 0;
 }
 
 void W_Hagar_Attack2_Load(Weapon thiswep, entity actor, .entity weaponentity)
@@ -283,8 +280,6 @@ void W_Hagar_Attack2_Load(Weapon thiswep, entity actor, .entity weaponentity)
                                actor.(weaponentity).state = WS_READY;
                                W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(hagar, ammo) * actor.(weaponentity).hagar_load * -1, weaponentity); // give back ammo
                                actor.(weaponentity).hagar_load = 0;
-                               if(weaponslot(weaponentity) == 0)
-                                       actor.hagar_load = 0;
                                sound(actor, CH_WEAPON_A, SND_HAGAR_BEEP, VOL_BASE, ATTN_NORM);
 
                                // pause until we can load rockets again, once we re-press the alt fire button
@@ -404,8 +399,6 @@ METHOD(Hagar, wr_think, void(entity thiswep, entity actor, .entity weaponentity,
 {
     float loadable_secondary;
     loadable_secondary = (WEP_CVAR_SEC(hagar, load) && WEP_CVAR(hagar, secondary));
-    if(weaponslot(weaponentity) == 0)
-       actor.hagar_load = actor.(weaponentity).hagar_load;
 
     if(loadable_secondary)
         W_Hagar_Attack2_Load(thiswep, actor, weaponentity); // must always run each frame
@@ -437,7 +430,6 @@ METHOD(Hagar, wr_gonethink, void(entity thiswep, entity actor, .entity weaponent
 }
 METHOD(Hagar, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
 {
-       actor.hagar_load = 0;
     actor.(weaponentity).hagar_loadblock = false;
     if(actor.(weaponentity).hagar_load)
     {
@@ -459,7 +451,6 @@ METHOD(Hagar, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponen
 }
 METHOD(Hagar, wr_resetplayer, void(entity thiswep, entity actor))
 {
-    actor.hagar_load = 0;
     for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
     {
        .entity weaponentity = weaponentities[slot];
index 575b76d72e12f4fbf9000331b3ed56a32cafd338..727ac08c6196d700a2fd9e4536e2bb7549092dec 100644 (file)
@@ -446,9 +446,6 @@ METHOD(MineLayer, wr_aim, void(entity thiswep, entity actor, .entity weaponentit
 }
 METHOD(MineLayer, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
 {
-       if(weaponslot(weaponentity) == 0)
-               actor.minelayer_mines = actor.(weaponentity).minelayer_mines;
-
     if(autocvar_g_balance_minelayer_reload_ammo && actor.(weaponentity).clip_load < WEP_CVAR(minelayer, ammo)) // forced reload
     {
         // not if we're holding the minelayer without enough ammo, but can detonate existing mines
@@ -492,7 +489,6 @@ METHOD(MineLayer, wr_checkammo2, bool(entity thiswep, entity actor, .entity weap
 }
 METHOD(MineLayer, wr_resetplayer, void(entity thiswep, entity actor))
 {
-    actor.minelayer_mines = 0;
     for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
     {
        .entity weaponentity = weaponentities[slot];
index 257faed6b961bfc7c045c3291a5c97ab48ca9507..7790d681ff82a2449229ec60afb6752ac67a9521 100644 (file)
@@ -168,9 +168,6 @@ METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity
     if(WEP_CVAR(vortex, charge) && actor.(weaponentity).vortex_charge < WEP_CVAR(vortex, charge_limit))
         actor.(weaponentity).vortex_charge = min(1, actor.(weaponentity).vortex_charge + WEP_CVAR(vortex, charge_rate) * frametime / W_TICSPERFRAME);
 
-    if(weaponslot(weaponentity) == 0)
-        actor.vortex_charge = actor.(weaponentity).vortex_charge;
-
     if(WEP_CVAR_SEC(vortex, chargepool))
         if(actor.(weaponentity).vortex_chargepool_ammo < 1)
         {
@@ -179,9 +176,6 @@ METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity
             actor.pauseregen_finished = max(actor.pauseregen_finished, time + WEP_CVAR_SEC(vortex, chargepool_pause_regen));
         }
 
-    if(weaponslot(weaponentity) == 0)
-        actor.vortex_chargepool_ammo = actor.(weaponentity).vortex_chargepool_ammo;
-
     if(autocvar_g_balance_vortex_reload_ammo && actor.(weaponentity).clip_load < min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo))) { // forced reload
         thiswep.wr_reload(thiswep, actor, weaponentity);
     } else
@@ -296,10 +290,6 @@ METHOD(Vortex, wr_checkammo2, bool(entity thiswep, entity actor, .entity weapone
 METHOD(Vortex, wr_resetplayer, void(entity thiswep, entity actor))
 {
     if (WEP_CVAR(vortex, charge)) {
-        if (WEP_CVAR_SEC(vortex, chargepool)) {
-            actor.vortex_chargepool_ammo = 1;
-        }
-        actor.vortex_charge = WEP_CVAR(vortex, charge_start);
         for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
         {
             .entity weaponentity = weaponentities[slot];
index 1ccc2c9db9ae45d402ecea28d16766cc2e74392d..bd87abdfc01f65fa22ca1aa298e97c542a34e787 100644 (file)
@@ -45,6 +45,30 @@ MACRO_END
     PROP(false, tuba_instrument, WEPENT_SET_NORMAL, \
        { WriteByte(chan, this.tuba_instrument); }, \
        { (viewmodels[this.m_wepent_slot]).tuba_instrument = ReadByte(); }) \
+    \
+    PROP(false, hagar_load, WEPENT_SET_NORMAL, \
+       { WriteByte(chan, this.hagar_load); }, \
+       { (viewmodels[this.m_wepent_slot]).hagar_load = ReadByte(); }) \
+    \
+    PROP(false, minelayer_mines, WEPENT_SET_NORMAL, \
+       { WriteByte(chan, this.minelayer_mines); }, \
+       { (viewmodels[this.m_wepent_slot]).minelayer_mines = ReadByte(); }) \
+    \
+    PROP(false, arc_heat_percent, WEPENT_SET_NORMAL, \
+       { WriteByte(chan, this.arc_heat_percent * 16); }, \
+       { (viewmodels[this.m_wepent_slot]).arc_heat_percent = ReadByte() / 16; }) \
+    \
+    PROP(false, vortex_chargepool_ammo, WEPENT_SET_NORMAL, \
+       { WriteByte(chan, this.vortex_chargepool_ammo * 16); }, \
+       { (viewmodels[this.m_wepent_slot]).vortex_chargepool_ammo = ReadByte() / 16; }) \
+    \
+    PROP(false, clip_load, WEPENT_SET_NORMAL, \
+       { WriteShort(chan, this.clip_load); }, \
+       { (viewmodels[this.m_wepent_slot]).clip_load = ReadShort(); }) \
+    \
+    PROP(false, clip_size, WEPENT_SET_NORMAL, \
+       { WriteShort(chan, this.clip_size); }, \
+       { (viewmodels[this.m_wepent_slot]).clip_size = ReadShort(); }) \
     \
        /**/
 
@@ -119,9 +143,9 @@ MACRO_END
 
        bool wepent_customize(entity this, entity client)
        {
-               //entity e = WaypointSprite_getviewentity(client);
+               entity e = WaypointSprite_getviewentity(client);
                .entity weaponentity = this.owner.weaponentity_fld;
-               return client.(weaponentity) == this.owner;
+               return e.(weaponentity) == this.owner;
        }
 
        void wepent_link(entity wep)
index dcd08d45f099678706f70e2c71a8bd99819c5d0a..d6db7745b9fe1cc5e1ebc8f0f0edcfca78382214 100644 (file)
@@ -4,8 +4,15 @@ REGISTER_NET_LINKED(ENT_CLIENT_WEPENT)
 REGISTER_NET_TEMP(CLIENT_WEPENT)
 
 .float vortex_charge;
+.float vortex_chargepool_ammo;
 .float oknex_charge;
+.float oknex_chargepool_ammo;
 .int tuba_instrument;
+.int minelayer_mines;
+.float arc_heat_percent;
+.int hagar_load;
+.int clip_load;
+.int clip_size;
 
 #ifdef SVQC
 
index 7f084b0086e4359d3a53e422f6b1e985d58b66cc..ade2e388215f2dfb7b9c03a9a119a2b49c51706b 100644 (file)
@@ -1765,8 +1765,6 @@ void SpectateCopy(entity this, entity spectatee)
        this.ammo_nails = spectatee.ammo_nails;
        this.ammo_rockets = spectatee.ammo_rockets;
        this.ammo_fuel = spectatee.ammo_fuel;
-       this.clip_load = spectatee.clip_load;
-       this.clip_size = spectatee.clip_size;
        this.effects = spectatee.effects & EFMASK_CHEAP; // eat performance
        this.health = spectatee.health;
        CS(this).impulse = 0;
@@ -1778,13 +1776,6 @@ void SpectateCopy(entity this, entity spectatee)
        this.superweapons_finished = spectatee.superweapons_finished;
        STAT(PRESSED_KEYS, this) = STAT(PRESSED_KEYS, spectatee);
        this.weapons = spectatee.weapons;
-       this.vortex_charge = spectatee.vortex_charge;
-       this.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
-       this.oknex_charge = spectatee.oknex_charge;
-       this.oknex_chargepool_ammo = spectatee.oknex_chargepool_ammo;
-       this.hagar_load = spectatee.hagar_load;
-       this.arc_heat_percent = spectatee.arc_heat_percent;
-       this.minelayer_mines = spectatee.minelayer_mines;
        this.punchangle = spectatee.punchangle;
        this.view_ofs = spectatee.view_ofs;
        this.velocity = spectatee.velocity;
@@ -1802,12 +1793,6 @@ void SpectateCopy(entity this, entity spectatee)
        setsize(this, spectatee.mins, spectatee.maxs);
        SetZoomState(this, CS(spectatee).zoomstate);
 
-       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
-       {
-               .entity weaponentity = weaponentities[slot];
-               this.(weaponentity) = spectatee.(weaponentity);
-       }
-
     anticheat_spectatecopy(this, spectatee);
        this.hud = spectatee.hud;
        if(spectatee.vehicle)
@@ -2304,12 +2289,6 @@ bool PlayerThink(entity this)
                {
                        .entity weaponentity = weaponentities[slot];
                        W_WeaponFrame(this, weaponentity);
-
-                       if(slot == 0)
-                       {
-                               this.clip_load = this.(weaponentity).clip_load;
-                               this.clip_size = this.(weaponentity).clip_size;
-                       }
                }
 
                this.items_added = 0;
index d52713c7c46aa7d677e518970321bde17f9d1f44..7a71ff1e7bda3c0d997e9bbb20fd5dfcc6643492 100644 (file)
@@ -324,18 +324,18 @@ float client_cefc_accumulatortime;
 
 .float weapon_load[Weapons_MAX];
 .int ammo_none; // used by the reloading system, must always be 0
-.float clip_load = _STAT(WEAPON_CLIPLOAD);
+.float clip_load;
 .float old_clip_load;
-.float clip_size = _STAT(WEAPON_CLIPSIZE);
+.float clip_size;
 
-.float minelayer_mines = _STAT(LAYED_MINES);
-.float vortex_charge = _STAT(VORTEX_CHARGE);
+.int minelayer_mines;
+.float vortex_charge;
 .float vortex_charge_rottime;
-.float vortex_chargepool_ammo = _STAT(VORTEX_CHARGEPOOL);
-.float oknex_charge = _STAT(OVERKILL_NEX_CHARGE);
+.float vortex_chargepool_ammo;
+.float oknex_charge;
 .float oknex_charge_rottime;
-.float oknex_chargepool_ammo = _STAT(OVERKILL_NEX_CHARGEPOOL);
-.float hagar_load = _STAT(HAGAR_LOAD);
+.float oknex_chargepool_ammo;
+.int hagar_load;
 
 .int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
 
index 9254ad581100394ffcb4d5a64addc675f246d97e..90aca172cc83f600e77c7d19e6a52405e7222547 100644 (file)
@@ -10,6 +10,7 @@
 #include <common/state.qh>
 #include <common/util.qh>
 #include <common/weapons/_all.qh>
+#include <common/wepent.qh>
 #include <common/items/_mod.qh>
 
 bool W_DualWielding(entity player)
index 363941b3a71210d24917f897f37c92c52f254d5b..1b4b179d2485d32f22fb06665f280f2014b3f22c 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 
+bool W_DualWielding(entity player);
 void W_GiveWeapon (entity e, float wep);
 .float prevstrengthsound;
 .float prevstrengthsoundattempt;