#include "lightningarc.qh"
-#ifdef IMPLEMENTATION
REGISTER_NET_TEMP(TE_CSQC_ARC)
#if defined(SVQC)
{
WriteHeader(MSG_BROADCAST, TE_CSQC_ARC);
- WriteCoord(MSG_BROADCAST, from.x);
- WriteCoord(MSG_BROADCAST, from.y);
- WriteCoord(MSG_BROADCAST, from.z);
- WriteCoord(MSG_BROADCAST, to.x);
- WriteCoord(MSG_BROADCAST, to.y);
- WriteCoord(MSG_BROADCAST, to.z);
+ WriteVector(MSG_BROADCAST, from);
+ WriteVector(MSG_BROADCAST, to);
}
#elif defined(CSQC)
int steps = min(16, floor(length / seglength));
if (steps < 1)
{
- te_lightning1(world, from, to);
+ te_lightning1(NULL, from, to);
return;
}
float drift = drifts * (1 - (i / steps)) + drifte * (i / steps);
vector dirnew = normalize(direction * (1 - drift) + randomvec() * drift);
vector pos = pos_l + dirnew * steplength;
- te_lightning1(world, pos_l, pos);
+ te_lightning1(NULL, pos_l, pos);
// WTF endless recursion if branchfactor is 1.0 (possibly due to adding branchfactor_add). FIXME
// if(random() < branchfactor)
// cl_effects_lightningarc(pos, pos + (dirnew * length * 0.25),seglength,drifts,drifte,min(branchfactor + branchfactor_add,1),branchfactor_add);
pos_l = pos;
}
- te_lightning1(world, pos_l, to);
+ te_lightning1(NULL, pos_l, to);
}
else
{
- te_lightning1(world, from, to);
+ te_lightning1(NULL, from, to);
}
}
NET_HANDLE(TE_CSQC_ARC, bool isNew)
{
- vector from;
- from.x = ReadCoord();
- from.y = ReadCoord();
- from.z = ReadCoord();
- vector to;
- to.x = ReadCoord();
- to.y = ReadCoord();
- to.z = ReadCoord();
+ vector from = ReadVector();
+ vector to = ReadVector();
return = true;
if (autocvar_cl_effects_lightningarc_simple)
{
- te_lightning1(world, from, to);
+ te_lightning1(NULL, from, to);
}
else
{
}
#endif
-
-#endif