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
===============
//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
cl.motionbluralpha = 1 - exp(-
(
(r_motionblur.value * blur_factor / 80)
-
+ +
(r_damageblur.value * (cl.cshifts[CSHIFT_DAMAGE].percent / 1600))
)
/
// 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
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