]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/overkill/okshotgun.qc
OK weapons: Removed unused stuff from shotgun and machinegun.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / overkill / okshotgun.qc
index 788c9ce4de8a198ecef98ce29b09baa7a98cd614..8f606bd3b01e6102e884c77ac7125230f8a94925 100644 (file)
@@ -85,7 +85,7 @@ METHOD(OverkillShotgun, wr_think, void(entity thiswep, entity actor, .entity wea
                {
                        return;
                }
-               // ugly instagib hack to reuse the fire mode of the laser
+               // Ugly hack to reuse the fire mode of the blaster.
                makevectors(actor.v_angle);
                Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
                actor.(weaponentity).m_weapon = WEP_BLASTER;
@@ -110,20 +110,14 @@ METHOD(OverkillShotgun, wr_think, void(entity thiswep, entity actor, .entity wea
 
 METHOD(OverkillShotgun, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
 {
-       float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR_PRI(okshotgun, ammo);
+       float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(okshotgun, ammo);
        ammo_amount += actor.(weaponentity).(weapon_load[WEP_OVERKILL_SHOTGUN.m_id]) >= WEP_CVAR_PRI(okshotgun, ammo);
        return ammo_amount;
 }
 
 METHOD(OverkillShotgun, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
 {
-       if (WEP_CVAR_SEC(okshotgun, ammo) == 0)
-       {
-               return true;
-       }
-       float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR_SEC(okshotgun, ammo);
-       ammo_amount += actor.(weaponentity).(weapon_load[WEP_OVERKILL_SHOTGUN.m_id]) >= WEP_CVAR_SEC(okshotgun, ammo);
-       return ammo_amount;
+       return true; // Blaster secondary is unlimited.
 }
 
 METHOD(OverkillShotgun, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))