From 0edecaa3afdc72a2befc492d9c80ff2251068b77 Mon Sep 17 00:00:00 2001 From: Samual Date: Sun, 14 Aug 2011 17:27:30 -0400 Subject: [PATCH] Or not.. try another method... the nextthink was conflicting with a function which updates the projectile for CSQC at the same time as the bounce. --- qcsrc/server/miscfunctions.qc | 2 +- qcsrc/server/w_grenadelauncher.qc | 21 +++++---------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index b669b041f..9d671fc50 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -2039,7 +2039,7 @@ float WarpZone_Projectile_Touch_ImpactFilter_Callback() return TRUE; } if(trace_ent && trace_ent.solid > SOLID_TRIGGER) - UpdateCSQCProjectileNextFrame(self); + UpdateCSQCProjectile(self); return FALSE; } #define PROJECTILE_TOUCH if(WarpZone_Projectile_Touch()) return diff --git a/qcsrc/server/w_grenadelauncher.qc b/qcsrc/server/w_grenadelauncher.qc index 077318055..52cfbf83c 100644 --- a/qcsrc/server/w_grenadelauncher.qc +++ b/qcsrc/server/w_grenadelauncher.qc @@ -70,18 +70,6 @@ void W_Grenade_Think1 (void) W_Grenade_Explode(); } -void W_Grenade_Think2 (void) -{ - self.nextthink = time; - if (time > self.cnt) - { - other = world; - self.projectiledeathtype |= HITTYPE_BOUNCE; - W_Grenade_Explode2 (); - return; - } -} - void W_Grenade_Touch1 (void) { PROJECTILE_TOUCH; @@ -153,7 +141,9 @@ void W_Grenade_Touch2 (void) self.gl_bouncecnt += 1; if (autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce && self.gl_bouncecnt == 1) - self.cnt = time + autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce; + self.nextthink = time + autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce; + + UpdateCSQCProjectile(self); } else if(autocvar_g_balance_grenadelauncher_secondary_type == 2 && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE))) // stick @@ -245,9 +235,8 @@ void W_Grenade_Attack2 (void) setorigin(gren, w_shotorg); setsize(gren, '-3 -3 -3', '3 3 3'); - gren.cnt = time + autocvar_g_balance_grenadelauncher_secondary_lifetime; - gren.nextthink = time; - gren.think = W_Grenade_Think2; + gren.nextthink = time + autocvar_g_balance_grenadelauncher_secondary_lifetime; + gren.think = adaptor_think2use_hittype_splash; gren.use = W_Grenade_Explode2; gren.touch = W_Grenade_Touch2; -- 2.39.2