X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_crylink.qc;h=e748987cb56a9d9a7f2441d32930a0da47ea6084;hb=2c960a8eaf5e3c4c95fdf8cff3522701332f05ae;hp=3866284a4c2007efeb3c0e55c99ec32044a2bc6e;hpb=2dc0beac5fadf6c6cdf777e75b7f0e9614d95763;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_crylink.qc b/qcsrc/server/w_crylink.qc index 3866284a4..e748987cb 100644 --- a/qcsrc/server/w_crylink.qc +++ b/qcsrc/server/w_crylink.qc @@ -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 { @@ -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; @@ -412,8 +413,6 @@ void W_Crylink_Attack (void) 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 +424,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 +439,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; @@ -505,8 +504,6 @@ void W_Crylink_Attack2 (void) 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) { @@ -616,7 +613,7 @@ float w_crylink(float req) return TRUE; ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_primary_ammo; - ammo_amount += self.weapon_load[WEP_CRYLINK] >= autocvar_g_balance_crylink_primary_ammo; + ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_primary_ammo; return ammo_amount; } else if (req == WR_CHECKAMMO2) @@ -626,7 +623,7 @@ float w_crylink(float req) return TRUE; ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_secondary_ammo; - ammo_amount += self.weapon_load[WEP_CRYLINK] >= autocvar_g_balance_crylink_secondary_ammo; + ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= autocvar_g_balance_crylink_secondary_ammo; return ammo_amount; } else if (req == WR_RELOAD) @@ -634,7 +631,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)