45 void cl_effects_lightningarc(
vector from,
vector to,
float seglength,
float drifts,
float drifte,
46 float branchfactor,
float branchfactor_add)
48 float length =
vlen(from - to);
49 if (length < 1)
return;
53 int steps =
min(16,
floor(length / seglength));
56 te_lightning1(
NULL, from, to);
60 float steplength = length / steps;
63 if (length > seglength)
65 for (
int i = 1; i < steps; ++i)
67 float drift = drifts * (1 - (i / steps)) + drifte * (i / steps);
69 vector pos = pos_l + dirnew * steplength;
70 te_lightning1(
NULL, pos_l, pos);
77 te_lightning1(
NULL, pos_l, to);
81 te_lightning1(
NULL, from, to);
93 te_lightning1(
NULL, from, to);
103 cl_effects_lightningarc(from, to, seglength, drifts, drifte, branchfactor, branchfactor_add);
#define NET_HANDLE(id, param)
#define WriteHeader(to, id)
#define REGISTER_NET_TEMP(id)
void te_csqc_lightningarc(vector from, vector to)
float autocvar_cl_effects_lightningarc_branchfactor_start
float autocvar_cl_effects_lightningarc_branchfactor_add
float autocvar_cl_effects_lightningarc_drift_start
float autocvar_cl_effects_lightningarc_segmentlength
float autocvar_cl_effects_lightningarc_drift_end
bool autocvar_cl_effects_lightningarc_simple