Module dpmod: Change committed
havoc at icculus.org
havoc at icculus.org
Thu Feb 20 03:45:09 EST 2003
Commiter : havoc
CVSROOT : /cvs/cvsroot/twilight
Module : dpmod
Commit time: 2003-02-20 08:45:09 UTC
Log message:
no longer constantly updates team stats every frame, this gives a good speed boost on helm18
Modified files:
qc/mode_management.qc
------=MIME.7a49f1a199ded9d64be36a821cdbcf7a
Content-Type: text/plain; name="dpmod.20030220.084509.havoc.diff"
Content-Disposition: attachment; filename="dpmod.20030220.084509.havoc.diff"
Content-Transfer-Encoding: 8bit
Index: dpmod/qc/mode_management.qc
diff -u dpmod/qc/mode_management.qc:1.2 dpmod/qc/mode_management.qc:1.3
--- dpmod/qc/mode_management.qc:1.2 Fri Nov 15 07:59:54 2002
+++ dpmod/qc/mode_management.qc Thu Feb 20 03:44:59 2003
@@ -1,5 +1,4 @@
-.entity teament;
float teamsinuse;
float mode_shirtmustmatchpants;
@@ -120,31 +119,14 @@
return world;
};
-void() updateteams =
+void() checkinvalidteam =
{
- local entity head, e;
- head = findchain(classname, "teamentity");
- while(head)
- {
- head.count = 0;
- head = head.chain;
- }
- teamsinuse = 0;
- head = findchain(classname, "player");
- while(head)
+ local entity e;
+ if (teamentityforcolor(self.team - 1) == world)
{
- e = teamentityforcolor(head.team - 1);
- if (e == world)
- {
- // team not allowed, reassign team
- e = weakestteam();
- setplayercolor(head, e.team - 1, e.team - 1);
- }
- if (e.count == 0)
- teamsinuse = teamsinuse + 1;
- e.count = e.count + 1;
- head.teament = e;
- head = head.chain;
+ // team not allowed, reassign team
+ e = weakestteam();
+ setplayercolor(self, e.team - 1, e.team - 1);
}
};
@@ -158,7 +140,6 @@
head.dmg = 0;
head = head.chain;
}
- updateteams();
};
float(float t) countteammembers =
@@ -308,7 +289,6 @@
}
if (deathmatch == 7)
deathmatch7update();
- updateteams();
};
// true if items should respawn
More information about the twilight-commits
mailing list