vec3_t ambientcolor, diffusecolor, diffusenormal;
vec_t *p;
- VM_SAFEPARMCOUNTRANGE(1, 2, VM_CL_getlight);
+ VM_SAFEPARMCOUNTRANGE(1, 3, VM_CL_getlight);
p = PRVM_G_VECTOR(OFS_PARM0);
VectorClear(ambientcolor);
else if (cl.worldmodel && cl.worldmodel->brush.LightPoint)
cl.worldmodel->brush.LightPoint(cl.worldmodel, p, ambientcolor, diffusecolor, diffusenormal);
VectorMA(ambientcolor, 0.5, diffusecolor, PRVM_G_VECTOR(OFS_RETURN));
+ if (PRVM_clientglobalvector(getlight_ambient))
+ VectorCopy(ambientcolor, PRVM_clientglobalvector(getlight_ambient));
+ if (PRVM_clientglobalvector(getlight_diffuse))
+ VectorCopy(diffusecolor, PRVM_clientglobalvector(getlight_diffuse));
+ if (PRVM_clientglobalvector(getlight_dir))
+ VectorCopy(diffusenormal, PRVM_clientglobalvector(getlight_dir));
}
//============================================================================
vector() randomvec = #91;
vector(vector org) getlight = #92;
vector(vector org, float lpflags) getlight2 = #92;
+vector getlight_dir;
+vector getlight_ambient;
+vector getlight_diffuse;
const float LP_LIGHTMAP = 1;
const float LP_RTWORLD = 2;
const float LP_DYNLIGHT = 4;
PRVM_DECLARE_clientglobalfloat(drawfont)
PRVM_DECLARE_clientglobalfloat(frametime)
PRVM_DECLARE_clientglobalfloat(gettaginfo_parent)
+PRVM_DECLARE_clientglobalvector(getlight_ambient)
+PRVM_DECLARE_clientglobalvector(getlight_diffuse)
+PRVM_DECLARE_clientglobalvector(getlight_dir)
PRVM_DECLARE_clientglobalfloat(input_buttons)
PRVM_DECLARE_clientglobalfloat(input_timelength)
PRVM_DECLARE_clientglobalfloat(intermission)
PRVM_DECLARE_global(gettaginfo_parent)
PRVM_DECLARE_global(gettaginfo_right)
PRVM_DECLARE_global(gettaginfo_up)
+PRVM_DECLARE_global(getlight_ambient)
+PRVM_DECLARE_global(getlight_diffuse)
+PRVM_DECLARE_global(getlight_dir)
PRVM_DECLARE_global(input_angles)
PRVM_DECLARE_global(input_buttons)
PRVM_DECLARE_global(input_movevalues)