From: Cobalt <co...@te...> - 2015-12-20 01:53:37
|
Strange, I just noticed the function: T_BeamDamage () , is not even called in 1.01 or 1.06 src code sets. Its using FindRadius, and if I recall someone had said that function is very very slow. I have seen some other code in my travels that resembles this function, however they are not using Findradius, but nextent, for example: float (vector pt, float damage) Calc_PointDamage = { local entity head; head = nextent (world); while (head != world) { if (head.takedamage > 0) { if (vlen (head.origin - pt) <= POINT_GIB_RADIUS) // Gib radius set as a global { if (damage > 0) T_Damage (head, damage); return 1; } } head = nextent (head); } return (0); }; Were pt is the origin of the old findradius method. Apparently walking down the entity list is faster than findradius? Also I have read where the findradius sets the .chain field even on entities not in the specified radius, so if true it can louse up some mods that rely on that field as being empty or world. So if we do make our own clean src, I suppose we could eliminate / delete T_BeamDamage completely. |