05.01.2010, 19:32
Hey there,
Sometimes our server freezes, it doesn't crash but stops doing anything
This is allways caused by this function (we added a print to every function to find the reason...hello 600 MB server_log )
Any ideas...?
The floatround for the 6 coordinates was added later
Sometimes our server freezes, it doesn't crash but stops doing anything
This is allways caused by this function (we added a print to every function to find the reason...hello 600 MB server_log )
Код:
public GetPointPointDis(Float:X1, Float:Y1, Float:Z1, Float:X2, Float:Y2, Float:Z2) { X1 = floatround(X1); Y1 = floatround(Y1); Z1 = floatround(Z1); X2 = floatround(X2); Y2 = floatround(Y2); Z2 = floatround(Z2); if(X1 == X2 && Y1 == Y2 && Z1 == Z2) return 0; X1 -= X2; Y1 -= Y2; Z1 -= Z2; new Float:dis = floatsqroot((X1*X1)+(Y1*Y1)+(Z1*Z1)); return floatround(dis); }
The floatround for the 6 coordinates was added later