}
else if (!strcmp("style", key))
style = atoi(value);
+ else if (!strcmp("skin", key))
+ skin = (int)atof(value);
+ else if (!strcmp("pflags", key))
+ pflags = (int)atof(value);
+ else if (!strcmp("effects", key))
+ effects = (int)atof(value);
else if (r_refdef.worldmodel->type == mod_brushq3)
{
if (!strcmp("scale", key))
if (!strcmp("fade", key))
fadescale = atof(value);
}
- else if (!strcmp("skin", key))
- skin = (int)atof(value);
- else if (!strcmp("pflags", key))
- pflags = (int)atof(value);
- else if (!strcmp("effects", key))
- effects = (int)atof(value);
}
if (!islight)
continue;
push = -push;
VectorMA(trace.endpos, push, r_viewforward, endpos);
VectorMA(endpos, r_editlights_cursorpushoff.value, trace.plane.normal, endpos);
+ }
+ else
+ {
+ VectorClear( endpos );
}
r_editlights_cursorlocation[0] = floor(endpos[0] / r_editlights_cursorgrid.value + 0.5f) * r_editlights_cursorgrid.value;
r_editlights_cursorlocation[1] = floor(endpos[1] / r_editlights_cursorgrid.value + 0.5f) * r_editlights_cursorgrid.value;
style = PRVM_G_FLOAT(OFS_PARM0);
val = PRVM_G_STRING(OFS_PARM1);
+ if( (unsigned) style >= 64 ) {
+ PRVM_ERROR( "PF_lightstyle: style: %i >= 64", style );
+ }
+
// change the string in sv
strlcpy(sv.lightstyles[style], val, sizeof(sv.lightstyles[style]));