From 4ed48a8a61f9fae873c3be12685e12d039911399 Mon Sep 17 00:00:00 2001 From: drjaska Date: Sun, 14 May 2023 00:27:09 +0300 Subject: [PATCH] I hate regex, this only fixes my mistakes Signed-off-by: drjaska --- cmd.c | 2 +- dpdefs/dpextensions.qc | 2 +- gl_rmain.c | 2 +- r_sprites.c | 4 ++-- world.c | 16 ++++++++-------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd.c b/cmd.c index c60a07eb..89acadc6 100644 --- 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 =============== diff --git a/dpdefs/dpextensions.qc b/dpdefs/dpextensions.qc index 1b944282..e69f98c4 100644 --- a/dpdefs/dpextensions.qc +++ b/dpdefs/dpextensions.qc @@ -1020,7 +1020,7 @@ string(string format, ...) sprintf = #627; //supported stuff: // % // optional: $ for the argument to format (the arg counter then is not increased) -// flags: #0- +// flags: #0- + // optional: , *, or *$ for the field width (width is read before value and precision) // optional: ., .*, or .*$ 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 diff --git a/gl_rmain.c b/gl_rmain.c index ea499aa0..87491f0f 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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)) ) / diff --git a/r_sprites.c b/r_sprites.c index ab07ab2b..efeff242 100644 --- a/r_sprites.c +++ b/r_sprites.c @@ -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 98d43951..1df5f84c 100644 --- 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 -- 2.39.2