[nexuiz-commits] r8481 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 6 09:06:20 EST 2010
Author: fruitiex
Date: 2010-01-06 09:06:19 -0500 (Wed, 06 Jan 2010)
New Revision: 8481
Modified:
trunk/data/qcsrc/server/arena.qc
Log:
fix announcer spam in arena
Modified: trunk/data/qcsrc/server/arena.qc
===================================================================
--- trunk/data/qcsrc/server/arena.qc 2010-01-05 16:13:06 UTC (rev 8480)
+++ trunk/data/qcsrc/server/arena.qc 2010-01-06 14:06:19 UTC (rev 8481)
@@ -206,11 +206,13 @@
{
if (g_ca)
allowed_to_spawn = 1;
- if(champion && !(g_ca))
- centerprint(self, strcat(msg, "The Champion is ", champion.netname, "^7\n"));
+ if(champion && g_arena)
+ msg = strcat("The Champion is ", champion.netname, "^7\n");
+ //centerprint(self, strcat(msg, "The Champion is ", champion.netname, "^7\n"));
if(f != roundStartTime_prev) {
- centerprint(self, strcat("Round will start in ", ftos(f),"\n"));
+ msg = strcat(msg, "Round will start in ", ftos(f),"\n");
+ //centerprint(self, strcat("Round will start in ", ftos(f),"\n"));
roundStartTime_prev = f;
if(f == 5)
play2all("announcer/robotic/prepareforbattle.wav");
@@ -220,10 +222,12 @@
play2all("announcer/robotic/2.wav");
else if(f == 1)
play2all("announcer/robotic/1.wav");
+
+ centerprint(self, msg);
}
- if (!g_ca) {
- if(self.spawned)
+ if (g_arena) {
+ if(self.spawned && self.classname == "player")
self.movetype = MOVETYPE_NONE;
self.velocity = '0 0 0';
@@ -233,22 +237,24 @@
}
}
- else if((!g_ca && self.movetype == MOVETYPE_NONE) || ((g_ca && f > -1 && f != roundStartTime_prev)))
+ else if(f > -1 && f != roundStartTime_prev)
{
- if(self.classname == "player")
- self.movetype = MOVETYPE_WALK;
- centerprint(self, "^1Fight!\n");
roundStartTime_prev = f;
play2all("announcer/robotic/begin.wav");
+ centerprint(self, "^1Begin!\n");
- player_cnt = 0;
+ if(g_ca) {
+ player_cnt = 0;
- FOR_EACH_CLIENT(self) {
- if (self.classname == "player") {
+ FOR_EACH_CLIENT(self) {
+ if (self.classname == "player")
player_cnt += 1;
- }
- }
+ }
+ }
}
+
+ if(self.classname == "player")
+ self.movetype = MOVETYPE_WALK;
}
float next_round;
More information about the nexuiz-commits
mailing list