r4368 - in trunk/data/qcsrc: client common server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Sep 5 15:43:02 EDT 2008
Author: esteel
Date: 2008-09-05 15:43:02 -0400 (Fri, 05 Sep 2008)
New Revision: 4368
Modified:
trunk/data/qcsrc/client/Main.qc
trunk/data/qcsrc/client/main.qh
trunk/data/qcsrc/client/sbar.qc
trunk/data/qcsrc/common/constants.qh
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/clientcommands.qc
Log:
added a simple 'warmup' indicator to the scoreboard
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2008-09-05 19:41:27 UTC (rev 4367)
+++ trunk/data/qcsrc/client/Main.qc 2008-09-05 19:43:02 UTC (rev 4368)
@@ -764,6 +764,11 @@
current_viewzoom = 0.6;
}
+void Net_ReadWarmupStage()
+{
+ warmup_stage = ReadByte();
+}
+
// CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
// You must ALWAYS first acquire the temporary ID, which is sent as a byte.
// Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
@@ -823,6 +828,10 @@
Net_ReadHoldAngles();
bHandled = true;
break;
+ case TE_CSQC_WARMUP:
+ Net_ReadWarmupStage();
+ bHandled = true;
+ break;
default:
// No special logic for this temporary entity; return 0 so the engine can handle it
bHandled = false;
Modified: trunk/data/qcsrc/client/main.qh
===================================================================
--- trunk/data/qcsrc/client/main.qh 2008-09-05 19:41:27 UTC (rev 4367)
+++ trunk/data/qcsrc/client/main.qh 2008-09-05 19:43:02 UTC (rev 4368)
@@ -122,5 +122,6 @@
float zoomin_effect;
float ignore_plus_zoom;
float ignore_minus_zoom;
+float warmup_stage;
float weaponimpulse[24];
Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc 2008-09-05 19:41:27 UTC (rev 4367)
+++ trunk/data/qcsrc/client/sbar.qc 2008-09-05 19:43:02 UTC (rev 4368)
@@ -931,9 +931,17 @@
}
}
+
pos_y += 1.5 * sbar_fontsize_y;
drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - sbar_fontsize_x * stringwidth(str, TRUE)), str, sbar_fontsize, 0.8, 0);
+ if(warmup_stage)
+ {
+ str = "^1Currently just warmup phase";
+ pos_y += 1.5 * sbar_fontsize_y;
+ drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - sbar_fontsize_x * stringwidth(str, TRUE)), str, sbar_fontsize, 0.8, 0);
+ }
+
sbar = sbar_save;
}
Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh 2008-09-05 19:41:27 UTC (rev 4367)
+++ trunk/data/qcsrc/common/constants.qh 2008-09-05 19:43:02 UTC (rev 4368)
@@ -16,7 +16,8 @@
// Revision 15: zoom
// Revision 16: multi-weapons
// Revision 17: multi-weaponimpulses
-#define CSQC_REVISION 17
+// Revision 18: warmup
+#define CSQC_REVISION 18
// probably put these in common/
// so server/ and client/ can be synced better
@@ -203,6 +204,7 @@
const float TE_CSQC_SPAWN = 112;
const float TE_CSQC_ZOOMNOTIFY = 113;
const float TE_CSQC_HOLDANGLES = 114;
+const float TE_CSQC_WARMUP = 115;
const float STAT_KH_KEYS = 32;
const float STAT_CTF_STATE = 33;
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-09-05 19:41:27 UTC (rev 4367)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-09-05 19:43:02 UTC (rev 4368)
@@ -586,6 +586,11 @@
WriteEntity(MSG_ONE, self);
}
+ msg_entity = self;
+ WriteByte(MSG_ONE, SVC_TEMPENTITY);
+ WriteByte(MSG_ONE, TE_CSQC_WARMUP);
+ WriteByte(MSG_ONE, !tourneyInMatchStage);
+
// player is dead and becomes observer
// FIXME fix LMS scoring for new system
if(g_lms)
Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc 2008-09-05 19:41:27 UTC (rev 4367)
+++ trunk/data/qcsrc/server/clientcommands.qc 2008-09-05 19:43:02 UTC (rev 4368)
@@ -417,6 +417,11 @@
//reset the .ready status of all players (also spectators)
FOR_EACH_CLIENTSLOT(e)
{
+ msg_entity = e;
+ WriteByte(MSG_ONE, SVC_TEMPENTITY);
+ WriteByte(MSG_ONE, TE_CSQC_WARMUP);
+ WriteByte(MSG_ONE, !tourneyInMatchStage);
+
e.ready = 0;
}
if(0<cvar("timelimit") || (g_tourney && (-1 == g_tourney_warmup_limit)) )
More information about the nexuiz-commits
mailing list