]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/overkill/okvortex.qc
OK weapons: Synced with master.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / overkill / okvortex.qc
index 0341cc953117c9c1f4c395d91f83e6541b638f42..cef11b95c5b3d9730f486ccbc2e99e3ae5ccc643 100644 (file)
@@ -27,8 +27,6 @@ METHOD(OverkillVortex, wr_glow, vector(OverkillVortex this, entity actor, entity
 #endif
 
 #ifdef SVQC
-spawnfunc(weapon_okvortex) { weapon_defaultspawnfunc(this, WEP_OVERKILL_VORTEX); }
-
 REGISTER_MUTATOR(okvortex_charge, true);
 
 MUTATOR_HOOKFUNCTION(okvortex_charge, GetPressedKeys)
@@ -314,17 +312,17 @@ METHOD(OverkillVortex, wr_setup, void(entity thiswep, entity actor, .entity weap
 
 METHOD(OverkillVortex, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
 {
-       float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR_PRI(okvortex, ammo);
+       float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(okvortex, ammo);
        ammo_amount += (autocvar_g_balance_okvortex_reload_ammo && actor.(weaponentity).(weapon_load[WEP_OVERKILL_VORTEX.m_id]) >= WEP_CVAR_PRI(okvortex, ammo));
        return ammo_amount;
 }
 
 METHOD(OverkillVortex, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
 {
-       if(WEP_CVAR(okvortex, secondary))
+       if (WEP_CVAR(okvortex, secondary))
        {
                // don't allow charging if we don't have enough ammo
-               float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR_SEC(okvortex, ammo);
+               float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(okvortex, ammo);
                ammo_amount += actor.(weaponentity).(weapon_load[WEP_OVERKILL_VORTEX.m_id]) >= WEP_CVAR_SEC(okvortex, ammo);
                return ammo_amount;
        }