[nexuiz-commits] r7826 - trunk/data/qcsrc/server/tturrets/system
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Sep 16 19:13:45 EDT 2009
Author: tzork
Date: 2009-09-16 19:13:38 -0400 (Wed, 16 Sep 2009)
New Revision: 7826
Modified:
trunk/data/qcsrc/server/tturrets/system/system_main.qc
Log:
Make multiple turrets a bit less of a cpuhog by spreading the thinks over different frames
Modified: trunk/data/qcsrc/server/tturrets/system/system_main.qc
===================================================================
--- trunk/data/qcsrc/server/tturrets/system/system_main.qc 2009-09-16 17:37:03 UTC (rev 7825)
+++ trunk/data/qcsrc/server/tturrets/system/system_main.qc 2009-09-16 23:13:38 UTC (rev 7826)
@@ -927,6 +927,7 @@
* (unless you have a very good reason not to)
* if the return value is 0, the turret should be removed.
*/
+float turret_count;
float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base, string head)
{
entity e,ee;
@@ -1293,7 +1294,8 @@
else
self.think = turret_think;
- self.nextthink = time + self.ticrate;
+ ++turret_count;
+ self.nextthink = time + self.ticrate + (turret_count * sys_ticrate);
self.tur_head.team = self.team;
self.view_ofs = '0 0 0';
More information about the nexuiz-commits
mailing list