VectorMA(org, 128, v2, v);
trace = CL_TraceLine(org, v, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, 0, 0, collision_extendmovelength.value, true, false, NULL, false, false);
}
- while (k < 16 && trace.fraction < 0.1f);
+ while (k++ < 16 && trace.fraction < 0.1f);
VectorSubtract(trace.endpos, org, v2);
VectorScale(v2, 2.0f, v2);
CL_NewParticle(org, pt_spark, 0x903010, 0xFFD030, tex_particle, 1.0f, 0, lhrandom(0, 255), 512, 0, 0, org[0], org[1], org[2], v2[0], v2[1], v2[2], 0, 0, 0, 0, true, 0, 1, PBLEND_ADD, PARTICLE_SPARK, -1, -1, -1, 1, 1, 0, 0, NULL);
char string[VM_STRINGTEMP_LENGTH];
int matchrule, matchlen, i, step;
const char *match;
-
+
VM_SAFEPARMCOUNTRANGE(3, 5, VM_bufstr_find);
PRVM_G_FLOAT(OFS_RETURN) = -1;
// get pattern/rule
matchrule = (int)PRVM_G_FLOAT(OFS_PARM2);
- if (matchrule < 0 && matchrule > 5)
+ if (matchrule < 0 || matchrule > 5)
{
VM_Warning(prog, "VM_bufstr_find: invalid match rule %i in %s\n", matchrule, prog->name);
return;
// get pattern/rule
matchrule = (int)PRVM_G_FLOAT(OFS_PARM2);
- if (matchrule < 0 && matchrule > 5)
+ if (matchrule < 0 || matchrule > 5)
{
- VM_Warning(prog, "VM_bufstr_find: invalid match rule %i in %s\n", matchrule, prog->name);
+ VM_Warning(prog, "VM_matchpattern: invalid match rule %i in %s\n", matchrule, prog->name);
return;
}
if (matchrule)
settings->rng_type = r_shadow_bouncegrid_rng_type.integer;
settings->rng_seed = r_shadow_bouncegrid_rng_seed.integer;
settings->bounceminimumintensity2 = bounceminimumintensity * bounceminimumintensity;
- settings->bounceminimumintensity2 = bounceminimumintensity * bounceminimumintensity;
settings->normalizevectors = r_shadow_bouncegrid_normalizevectors.integer != 0;
settings->subsamples = bound(1, r_shadow_bouncegrid_subsamples.integer, 4);