]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix a dead initialization. Fix a use of an uninitialized value.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 09:21:45 +0000 (09:21 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 09:21:45 +0000 (09:21 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12189 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c
model_brush.c

index 7b8ef5bfef405448425fa15953a5f3c03483d09c..fb81172c99cf9894a45ce9590d1f7406cc83254f 100644 (file)
@@ -1785,6 +1785,11 @@ void CL_ReadPointFile_f (void)
        VectorCopy(leakorg, vecorg);
        Con_Printf("%i points read (%i particles spawned)\nLeak at %f %f %f\n", c, s, leakorg[0], leakorg[1], leakorg[2]);
 
+       if (c == 0)
+       {
+               return;
+       }
+
        CL_NewParticle(vecorg, pt_beam, 0xFF0000, 0xFF0000, tex_beam, 64, 0, 255, 0, 0, 0, org[0] - 4096, org[1], org[2], org[0] + 4096, org[1], org[2], 0, 0, 0, 0, false, 1<<30, 1, PBLEND_ADD, PARTICLE_HBEAM, -1, -1, -1, 1, 1, 0, 0, NULL);
        CL_NewParticle(vecorg, pt_beam, 0x00FF00, 0x00FF00, tex_beam, 64, 0, 255, 0, 0, 0, org[0], org[1] - 4096, org[2], org[0], org[1] + 4096, org[2], 0, 0, 0, 0, false, 1<<30, 1, PBLEND_ADD, PARTICLE_HBEAM, -1, -1, -1, 1, 1, 0, 0, NULL);
        CL_NewParticle(vecorg, pt_beam, 0x0000FF, 0x0000FF, tex_beam, 64, 0, 255, 0, 0, 0, org[0], org[1], org[2] - 4096, org[0], org[1], org[2] + 4096, 0, 0, 0, 0, false, 1<<30, 1, PBLEND_ADD, PARTICLE_HBEAM, -1, -1, -1, 1, 1, 0, 0, NULL);
index 5cc71a7eacd80fd79bb8c4d0136948027b1aefcf..6fd45ee75de43255a498c09a61b574287a017fc3 100644 (file)
@@ -4415,7 +4415,7 @@ static void Mod_Q2BSP_LoadTexinfo(sizebuf_t *sb)
        // if we encounter the textures out of order, the later ones won't mark the earlier ones in a sequence, so the earlier 
        for (i = 0, out = loadmodel->brushq1.texinfo;i < count;i++, out++)
        {
-               int j = i;
+               int j;
                texture_t *t = loadmodel->data_textures + out->textureindex;
 
                // if this is not animated, skip it