]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
I hate regex, this only fixes my mistakes drjaska/cleaning
authordrjaska <drjaska83@gmail.com>
Sat, 13 May 2023 21:27:09 +0000 (00:27 +0300)
committerdrjaska <drjaska83@gmail.com>
Sat, 13 May 2023 21:43:18 +0000 (00:43 +0300)
Signed-off-by: drjaska <drjaska83@gmail.com>
cmd.c
dpdefs/dpextensions.qc
gl_rmain.c
r_sprites.c
world.c

diff --git a/cmd.c b/cmd.c
index c60a07eb12eccc97937db803bf6f864302b8b693..89acadc6cbd173eec934ba7c78b9eecfaa2b29c6 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -544,7 +544,7 @@ void Cbuf_Frame(cmd_buf_t *cbuf)
 Cmd_StuffCmds_f
 
 Adds command line parameters as script statements
-Commands lead with a +, and continue until a - or another
+Commands lead with a +, and continue until a - or another +
 quake +prog jctest.qp +cmd amlev1
 quake -nosound +cmd amlev1
 ===============
index 1b9442820bee39f7807ff381c549630080a93329..e69f98c4c296952b6b39629100943d41c3ff3146 100644 (file)
@@ -1020,7 +1020,7 @@ string(string format, ...) sprintf = #627;
 //supported stuff:
 //  %
 //  optional: <argpos>$ for the argument to format (the arg counter then is not increased)
-//  flags: #0-
+//  flags: #0- +
 //  optional: <width>, *, or *<argpos>$ for the field width (width is read before value and precision)
 //  optional: .<precision>, .*, or .*<argpos>$ for the precision (precision is read before value)
 //  length modifiers: h for forcing a float, l for forcing an entity (by default, %d etc. cast a float to int), ll for forcing an int
index ea499aa07e98920b55819ddc0293e89bb8e914c4..87491f0f7beb3542593a7652e228e68887ab20a7 100644 (file)
@@ -5283,7 +5283,7 @@ static void R_BlendView(int viewfbo, rtexture_t *viewdepthtexture, rtexture_t *v
                cl.motionbluralpha = 1 - exp(-
                                (
                                        (r_motionblur.value * blur_factor / 80)
-
+                                       +
                                        (r_damageblur.value * (cl.cshifts[CSHIFT_DAMAGE].percent / 1600))
                                )
                                /
index ab07ab2b35641905658c87a75996692cfd8fee84..efeff242b235bd06aa42a9c06929032b4319168d 100644 (file)
@@ -110,8 +110,8 @@ static void R_TrackSprite(const entity_render_t *ent, vec3_t origin, vec3_t left
                // d*d = r*r / (1 + fxa*fxa + gyb*gyb)
                // d = sqrt(r*r / (1 + fxa*fxa + gyb*gyb))
                // thus:
-               distance = sqrt((distance*distance) / (1.0
-                                       r_refdef.view.frustum_x*r_refdef.view.frustum_x * x*x * ax*ax
+               distance = sqrt((distance*distance) / (1.0 +
+                                       r_refdef.view.frustum_x*r_refdef.view.frustum_x * x*x * ax*ax +
                                        r_refdef.view.frustum_y*r_refdef.view.frustum_y * y*y * ay*ay));
                // ^ the one we want        ^ the one we have       ^ our factors
 
diff --git a/world.c b/world.c
index 98d43951fd17cae48e5760791cb6a5e742c50b19..1df5f84c6021ecdd2a99841ebac0409c4a943a9d 100644 (file)
--- a/world.c
+++ b/world.c
@@ -2467,15 +2467,15 @@ static void World_Physics_Frame_BodyFromEntity(world_t *world, prvm_edict_t *ed)
                                polygons = polygonsData;
                                for (i = 0; i < numplanes; i++)
                                {
-                                       if((pointsData[(polygons[1]*3)+0]*pointsData[(polygons[2]*3)+1]*pointsData[(polygons[3]*3)+2]
-                                               pointsData[(polygons[1]*3)+1]*pointsData[(polygons[2]*3)+2]*pointsData[(polygons[3]*3)+0]
-                                               pointsData[(polygons[1]*3)+2]*pointsData[(polygons[2]*3)+0]*pointsData[(polygons[3]*3)+1] -
-                                               pointsData[(polygons[1]*3)+2]*pointsData[(polygons[2]*3)+1]*pointsData[(polygons[3]*3)+0] -
-                                               pointsData[(polygons[1]*3)+1]*pointsData[(polygons[2]*3)+0]*pointsData[(polygons[3]*3)+2] -
-                                               pointsData[(polygons[1]*3)+0]*pointsData[(polygons[2]*3)+2]*pointsData[(polygons[3]*3)+1]) < 0)
-                                               Con_Printf(CON_WARN "WARNING: Polygon %d is not defined counterclockwise\n", i);
+                                       if((pointsData[(polygons[1]*3)+0]*pointsData[(polygons[2]*3)+1]*pointsData[(polygons[3]*3)+2] +
+                                           pointsData[(polygons[1]*3)+1]*pointsData[(polygons[2]*3)+2]*pointsData[(polygons[3]*3)+0] +
+                                           pointsData[(polygons[1]*3)+2]*pointsData[(polygons[2]*3)+0]*pointsData[(polygons[3]*3)+1] -
+                                           pointsData[(polygons[1]*3)+2]*pointsData[(polygons[2]*3)+1]*pointsData[(polygons[3]*3)+0] -
+                                           pointsData[(polygons[1]*3)+1]*pointsData[(polygons[2]*3)+0]*pointsData[(polygons[3]*3)+2] -
+                                           pointsData[(polygons[1]*3)+0]*pointsData[(polygons[2]*3)+2]*pointsData[(polygons[3]*3)+1]) < 0)
+                                                       Con_Printf(CON_WARN "WARNING: Polygon %d is not defined counterclockwise\n", i);
                                        if (planesData[(i*4)+3] < 0)
-                                               Con_Printf(CON_WARN "WARNING: Plane %d does not contain the origin\n", i);
+                                           Con_Printf(CON_WARN "WARNING: Plane %d does not contain the origin\n", i);
                                        polygons += (*polygons + 1);
                                }
                                // create geom