]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Or not.. try another method... the nextthink was conflicting with a function which...
authorSamual <samual@xonotic.org>
Sun, 14 Aug 2011 21:27:30 +0000 (17:27 -0400)
committerSamual <samual@xonotic.org>
Sun, 14 Aug 2011 21:27:30 +0000 (17:27 -0400)
qcsrc/server/miscfunctions.qc
qcsrc/server/w_grenadelauncher.qc

index b669b041f51f765b10c8875b3e2d5c89d8fe6308..9d671fc50b77e2d49cd0c4f865d3cd0f04aa581e 100644 (file)
@@ -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
index 077318055c03cbf3f9fc24918a788073df24b1f0..52cfbf83c932436ddd2e455bc1e837a34163b0c7 100644 (file)
@@ -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;