]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/crylink.qc
Remove legacy Quake bbox expansion: projectiles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / crylink.qc
index 5458a2496b92e9ab241660b0079fdcad09324092..074a99abab9887a7271d4ff78cd1ddfbbd3a9ae6 100644 (file)
@@ -341,11 +341,12 @@ 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, '0 0 0', '0 0 0');
+               setsize(proj, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
 
 
                s = '0 0 0';
@@ -454,11 +455,12 @@ 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, '0 0 0', '0 0 0');
+               setsize(proj, UNHITTABLEPROJ_MINS, UNHITTABLEPROJ_MAXS);
 
                if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
                {
@@ -522,9 +524,9 @@ void W_Crylink_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
 METHOD(Crylink, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
 {
     if(random() < 0.10)
-        PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), false);
+        PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), false, true);
     else
-        PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), false);
+        PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), false, true);
 }
 METHOD(Crylink, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
 {
@@ -619,8 +621,7 @@ METHOD(Crylink, wr_killmessage, Notification(entity thiswep))
 #ifdef CSQC
 METHOD(Crylink, wr_impacteffect, void(entity thiswep, entity actor))
 {
-    vector org2;
-    org2 = w_org + w_backoff * 2;
+    vector org2 = w_org + w_backoff * 2;
     if(w_deathtype & HITTYPE_SECONDARY)
     {
         pointparticles(EFFECT_CRYLINK_IMPACT2, org2, '0 0 0', 1);