- ret = true;
- if(viewmatrix || clipplane || visorigin)
- {
- Matrix4x4_ToVectors(viewmatrix, forward, left, up, origin);
- AnglesFromVectors(ang, forward, up, false);
- PRVM_clientglobalfloat(time) = cl.time;
- PRVM_clientglobaledict(self) = entnum;
- VectorCopy(origin, PRVM_G_VECTOR(OFS_PARM0));
- VectorCopy(ang, PRVM_G_VECTOR(OFS_PARM1));
- VectorCopy(forward, PRVM_clientglobalvector(v_forward));
- VectorScale(left, -1, PRVM_clientglobalvector(v_right));
- VectorCopy(up, PRVM_clientglobalvector(v_up));
- VectorCopy(origin, PRVM_clientglobalvector(trace_endpos));
- prog->ExecuteProgram(prog, PRVM_clientedictfunction(ed, camera_transform), "QC function e.camera_transform is missing");
- VectorCopy(PRVM_G_VECTOR(OFS_RETURN), origin);
- VectorCopy(PRVM_clientglobalvector(v_forward), forward);
- VectorScale(PRVM_clientglobalvector(v_right), -1, left);
- VectorCopy(PRVM_clientglobalvector(v_up), up);
- VectorCopy(PRVM_clientglobalvector(trace_endpos), visorigin);
- Matrix4x4_Invert_Full(&mat, viewmatrix);
- Matrix4x4_FromVectors(viewmatrix, forward, left, up, origin);
- Matrix4x4_Concat(&matq, viewmatrix, &mat);
- Matrix4x4_TransformPositivePlane(&matq, clipplane->normal[0], clipplane->normal[1], clipplane->normal[2], clipplane->dist, &clipplane->normal[0]);
- }
+ Matrix4x4_ToVectors(viewmatrix, forward, left, up, origin);
+ AnglesFromVectors(ang, forward, up, false);
+ PRVM_clientglobalfloat(time) = cl.time;
+ PRVM_clientglobaledict(self) = entnum;
+ VectorCopy(origin, PRVM_G_VECTOR(OFS_PARM0));
+ VectorCopy(ang, PRVM_G_VECTOR(OFS_PARM1));
+ VectorCopy(forward, PRVM_clientglobalvector(v_forward));
+ VectorScale(left, -1, PRVM_clientglobalvector(v_right));
+ VectorCopy(up, PRVM_clientglobalvector(v_up));
+ VectorCopy(origin, PRVM_clientglobalvector(trace_endpos));
+ prog->ExecuteProgram(prog, PRVM_clientedictfunction(ed, camera_transform), "QC function e.camera_transform is missing");
+ VectorCopy(PRVM_G_VECTOR(OFS_RETURN), origin);
+ VectorCopy(PRVM_clientglobalvector(v_forward), forward);
+ VectorScale(PRVM_clientglobalvector(v_right), -1, left);
+ VectorCopy(PRVM_clientglobalvector(v_up), up);
+ VectorCopy(PRVM_clientglobalvector(trace_endpos), visorigin);
+ Matrix4x4_Invert_Full(&mat, viewmatrix);
+ Matrix4x4_FromVectors(viewmatrix, forward, left, up, origin);
+ Matrix4x4_Concat(&matq, viewmatrix, &mat);
+ Matrix4x4_TransformPositivePlane(&matq, clipplane->normal[0], clipplane->normal[1], clipplane->normal[2], clipplane->dist, clipplane->normal_and_dist);