]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/crylink.qc
Revert "Remove legacy Quake bbox expansion: projectiles"
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / crylink.qc
index 074a99abab9887a7271d4ff78cd1ddfbbd3a9ae6..6a69a7c570936f87b24e92f5666fceeb11275c74 100644 (file)
@@ -341,12 +341,11 @@ void W_Crylink_Attack(Weapon thiswep, entity actor, .entity weaponentity)
 
                set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
                PROJECTILE_MAKETRIGGER(proj);
-               proj.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
                proj.projectiledeathtype = thiswep.m_id;
                //proj.gravity = 0.001;
 
                setorigin(proj, w_shotorg);
-               setsize(proj, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+               setsize(proj, '0 0 0', '0 0 0');
 
 
                s = '0 0 0';
@@ -392,7 +391,7 @@ void W_Crylink_Attack(Weapon thiswep, entity actor, .entity weaponentity)
 
                MUTATOR_CALLHOOK(EditProjectile, actor, proj);
        }
-       if(WEP_CVAR_PRI(crylink, joinspread) != 0)
+       if(WEP_CVAR_PRI(crylink, joinspread) != 0 && WEP_CVAR_PRI(crylink, shots) > 1)
        {
                actor.(weaponentity).crylink_lastgroup = proj;
                W_Crylink_CheckLinks(proj);
@@ -455,12 +454,11 @@ void W_Crylink_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
 
                set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
                PROJECTILE_MAKETRIGGER(proj);
-               proj.clipgroup = CLIPGROUP_UNHITTABLEPROJ;
                proj.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
                //proj.gravity = 0.001;
 
                setorigin(proj, w_shotorg);
-               setsize(proj, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
+               setsize(proj, '0 0 0', '0 0 0');
 
                if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
                {
@@ -513,7 +511,7 @@ void W_Crylink_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
 
                MUTATOR_CALLHOOK(EditProjectile, actor, proj);
        }
-       if(WEP_CVAR_SEC(crylink, joinspread) != 0)
+       if(WEP_CVAR_SEC(crylink, joinspread) != 0 && WEP_CVAR_SEC(crylink, shots) > 1)
        {
                actor.(weaponentity).crylink_lastgroup = proj;
                W_Crylink_CheckLinks(proj);
@@ -534,7 +532,7 @@ METHOD(Crylink, wr_think, void(entity thiswep, entity actor, .entity weaponentit
         thiswep.wr_reload(thiswep, actor, weaponentity);
     }
 
-    if(fire & 1)
+    else if(fire & 1)
     {
         if(actor.(weaponentity).crylink_waitrelease != 1)
         if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(crylink, refire)))
@@ -544,7 +542,7 @@ METHOD(Crylink, wr_think, void(entity thiswep, entity actor, .entity weaponentit
         }
     }
 
-    if((fire & 2) && autocvar_g_balance_crylink_secondary)
+    else if((fire & 2) && autocvar_g_balance_crylink_secondary)
     {
         if(actor.(weaponentity).crylink_waitrelease != 2)
         if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(crylink, refire)))