X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_crylink.qc;h=5a19edf36040cc39537e20dcdb9e1de9b260931a;hp=aa72d8ec1736590dc0c1bb42b8f2489d289a7bea;hb=6018d119b3c9f4e54d6d21f6339948708c83d83f;hpb=c7a28837f2a255a7cddfa46ac986b2baacaada6b diff --git a/qcsrc/server/w_crylink.qc b/qcsrc/server/w_crylink.qc index aa72d8ec17..5a19edf360 100644 --- a/qcsrc/server/w_crylink.qc +++ b/qcsrc/server/w_crylink.qc @@ -69,9 +69,9 @@ void W_Crylink_LinkExplode (entity e, entity e2) e.realowner.crylink_lastgroup = world; if(e.projectiledeathtype & HITTYPE_SECONDARY) - RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_damage * a, autocvar_g_balance_crylink_secondary_edgedamage * a, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * a, e.projectiledeathtype, other); + RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_damage * a, autocvar_g_balance_crylink_secondary_edgedamage * a, autocvar_g_balance_crylink_secondary_radius, world, world, autocvar_g_balance_crylink_secondary_force * a, e.projectiledeathtype, other); else - RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other); + RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other); W_Crylink_LinkExplode(e.queuenext, e2); @@ -133,6 +133,7 @@ vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime) p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity); UpdateCSQCProjectile(p); } + targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE } else { @@ -200,7 +201,7 @@ void W_Crylink_LinkJoinEffect_Think() n = n / autocvar_g_balance_crylink_secondary_shots; RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n, autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n, - autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner, + autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner, world, autocvar_g_balance_crylink_secondary_joinexplode_force * n, e.projectiledeathtype, other); pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n); @@ -213,7 +214,7 @@ void W_Crylink_LinkJoinEffect_Think() n = n / autocvar_g_balance_crylink_primary_shots; RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n, autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n, - autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner, + autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner, world, autocvar_g_balance_crylink_primary_joinexplode_force * n, e.projectiledeathtype, other); pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n); @@ -241,7 +242,7 @@ void W_Crylink_Touch (void) f = autocvar_g_balance_crylink_primary_bouncedamagefactor; if(a) f *= a; - if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_primary_damage * f, autocvar_g_balance_crylink_primary_edgedamage * f, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_primary_linkexplode) + if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_primary_damage * f, autocvar_g_balance_crylink_primary_edgedamage * f, autocvar_g_balance_crylink_primary_radius, world, world, autocvar_g_balance_crylink_primary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_primary_linkexplode) { if(self == self.realowner.crylink_lastgroup) self.realowner.crylink_lastgroup = world; @@ -282,7 +283,7 @@ void W_Crylink_Touch2 (void) f = autocvar_g_balance_crylink_secondary_bouncedamagefactor; if(a) f *= a; - if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_secondary_damage * f, autocvar_g_balance_crylink_secondary_edgedamage * f, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_secondary_linkexplode) + if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_secondary_damage * f, autocvar_g_balance_crylink_secondary_edgedamage * f, autocvar_g_balance_crylink_secondary_radius, world, world, autocvar_g_balance_crylink_secondary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_secondary_linkexplode) { if(self == self.realowner.crylink_lastgroup) self.realowner.crylink_lastgroup = world; @@ -315,9 +316,9 @@ void W_Crylink_Fadethink (void) void W_Crylink_Attack (void) { - local float counter, shots; - local entity proj, prevproj, firstproj; - local vector s; + float counter, shots; + entity proj, prevproj, firstproj; + vector s; vector forward, right, up; float maxdmg; @@ -335,8 +336,8 @@ void W_Crylink_Attack (void) shots = autocvar_g_balance_crylink_primary_shots; pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots); - proj = world; - while (counter < shots) + proj = prevproj = firstproj = world; + for(counter = 0; counter < shots; ++counter) { proj = spawn (); proj.reset = W_Crylink_Reset; @@ -408,12 +409,11 @@ void W_Crylink_Attack (void) //proj.glow_size = 20; proj.flags = FL_PROJECTILE; - + proj.missile_flags = MIF_SPLASH; + CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE); other = proj; MUTATOR_CALLHOOK(EditProjectile); - - counter = counter + 1; } if(autocvar_g_balance_crylink_primary_joinspread != 0 || autocvar_g_balance_crylink_primary_jointime != 0) { @@ -425,8 +425,8 @@ void W_Crylink_Attack (void) void W_Crylink_Attack2 (void) { - local float counter, shots; - local entity proj, prevproj, firstproj; + float counter, shots; + entity proj, prevproj, firstproj; float maxdmg; W_DecreaseAmmo(ammo_cells, autocvar_g_balance_crylink_secondary_ammo, autocvar_g_balance_crylink_reload_ammo); @@ -440,8 +440,8 @@ void W_Crylink_Attack2 (void) shots = autocvar_g_balance_crylink_secondary_shots; pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots); - proj = world; - while (counter < shots) + proj = prevproj = firstproj = world; + for(counter = 0; counter < shots; ++counter) { proj = spawn (); proj.reset = W_Crylink_Reset; @@ -501,12 +501,11 @@ void W_Crylink_Attack2 (void) //proj.glow_size = 20; proj.flags = FL_PROJECTILE; - + proj.missile_flags = MIF_SPLASH; + CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE); other = proj; MUTATOR_CALLHOOK(EditProjectile); - - counter = counter + 1; } if(autocvar_g_balance_crylink_secondary_joinspread != 0 || autocvar_g_balance_crylink_secondary_jointime != 0) { @@ -634,7 +633,7 @@ float w_crylink(float req) W_Reload(min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo), autocvar_g_balance_crylink_reload_ammo, autocvar_g_balance_crylink_reload_time, "weapons/reload.wav"); } return TRUE; -}; +} #endif #ifdef CSQC float w_crylink(float req)