From: havoc Date: Fri, 10 Mar 2006 23:23:21 +0000 (+0000) Subject: fixed cl_activebeams handling, now beams work again X-Git-Tag: xonotic-v0.1.0preview~4226 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d373182d7cf58c4f6238e7de6dc441ba6d625379;p=xonotic%2Fdarkplaces.git fixed cl_activebeams handling, now beams work again git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6092 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_main.c b/cl_main.c index 0ef8768f..c05ff07c 100644 --- 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) diff --git a/cl_parse.c b/cl_parse.c index 0cfdd68e..7430363d 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -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;