if(random() < branchfactor)
cl_effetcs_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);
if(random() < branchfactor)
cl_effetcs_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);