]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed cl_activebeams handling, now beams work again
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 10 Mar 2006 23:23:21 +0000 (23:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 10 Mar 2006 23:23:21 +0000 (23:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6092 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
cl_parse.c

index 0ef8768fd7faa2c33ad6853d3c5b7b46e99b4de6..c05ff07cfbb1828e1cd40ad70101c3d9ac69c45d 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -1447,8 +1447,6 @@ void CL_RelinkBeams(void)
        float forward;
        matrix4x4_t tempmatrix;
 
-       while (cl_activebeams > 0 && !cl_beams[cl_activebeams - 1].model)
-               cl_activeeffects--;
        for (i = 0, b = cl_beams;i < cl_activebeams;i++, b++)
        {
                if (!b->model)
@@ -1528,6 +1526,9 @@ void CL_RelinkBeams(void)
                        d -= 30;
                }
        }
+
+       while (cl_activebeams > 0 && !cl_beams[cl_activebeams - 1].model)
+               cl_activebeams--;
 }
 
 static void CL_RelinkQWNails(void)
index 0cfdd68e32d3929b02b9ea7014439bc5ae718214..7430363d1b62a196e9d11aad69cb932382e5597c 100644 (file)
@@ -1527,6 +1527,7 @@ void CL_ParseBeam (model_t *m, int lightning)
                                break;
        if (i < cl_max_beams)
        {
+               cl_activebeams = max(cl_activebeams, i + 1);
                b->entity = ent;
                b->lightning = lightning;
                b->model = m;