From 861fbd5b27e022e57892a43c67d421b615c0cae6 Mon Sep 17 00:00:00 2001 From: div0 Date: Wed, 28 Jan 2009 17:44:32 +0000 Subject: [PATCH] get rid of TE_CSQC_WARMUP git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5686 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/client/Main.qc | 10 +--------- data/qcsrc/common/constants.qh | 1 - data/qcsrc/server/cl_client.qc | 10 ---------- data/qcsrc/server/clientcommands.qc | 11 +++-------- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 9f4433394..a6b5bafa2 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -495,6 +495,7 @@ void Ent_Nagger() ready_waiting_for_me = (nags & 2); vote_waiting = (nags & 4); vote_waiting_for_me = (nags & 8); + warmup_stage = (nags & 16); } // CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured. @@ -827,11 +828,6 @@ void Net_ReadSpawn() 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. @@ -883,10 +879,6 @@ float CSQC_Parse_TempEntity() Net_ReadHoldAngles(); bHandled = true; break; - case TE_CSQC_WARMUP: - Net_ReadWarmupStage(); - bHandled = true; - break; case TE_CSQC_FOG: Net_ReadFog(); bHandled = true; diff --git a/data/qcsrc/common/constants.qh b/data/qcsrc/common/constants.qh index 06b114239..8ef9327f2 100644 --- a/data/qcsrc/common/constants.qh +++ b/data/qcsrc/common/constants.qh @@ -223,7 +223,6 @@ const float TE_CSQC_SPECTATING = 111; // TODO turn into shared ent const float TE_CSQC_SPAWN = 112; const float TE_CSQC_ZOOMNOTIFY = 113; // TODO turn into shared ent const float TE_CSQC_HOLDANGLES = 114; // TODO turn into shared ent -const float TE_CSQC_WARMUP = 115; // TODO turn into shared ent const float TE_CSQC_FOG = 116; // TODO turn into shared ent // ideas: turn TE_CSQC_FORCESCOREBOARD, TE_CSQC_SPECTATING, TE_CSQC_ZOOMNOTIFY, TE_CSQC_HOLDANGLES into a single shared ent, the other two in ones for their own diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 799c24fdf..5544387d8 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -1268,16 +1268,6 @@ void ClientConnect (void) { sprint(self, strcat("nexuiz-csqc protocol ", ftos(CSQC_REVISION), "\n")); - msg_entity = self; - - if(inWarmupStage) - { - msg_entity = self; - WriteByte(MSG_ONE, SVC_TEMPENTITY); - WriteByte(MSG_ONE, TE_CSQC_WARMUP); - WriteByte(MSG_ONE, 1); - } - if(cvar("g_bugrigs")) stuffcmd(self, "cl_cmd settemp chase_active 1\n"); } diff --git a/data/qcsrc/server/clientcommands.qc b/data/qcsrc/server/clientcommands.qc index 14b2ac667..c040eb887 100644 --- a/data/qcsrc/server/clientcommands.qc +++ b/data/qcsrc/server/clientcommands.qc @@ -18,6 +18,8 @@ float Nagger_SendEntity(entity to, float sendflags) if(to.vote_vote == 0) nags |= 8; } + if(inWarmupStage) + nags |= 16; if(sendflags & 128) { @@ -361,14 +363,7 @@ void ReadyRestartForce() FOR_EACH_CLIENTSLOT(e) e.ready = 0; readycount = 0; - Nagger_ReadyCounted(); - FOR_EACH_REALCLIENT(e) - { - msg_entity = e; - WriteByte(MSG_ONE, SVC_TEMPENTITY); - WriteByte(MSG_ONE, TE_CSQC_WARMUP); - WriteByte(MSG_ONE, 0); - } + Nagger_ReadyCounted(); // NOTE: this causes a resend of that entity, and will also turn off warmup state on the client if(cvar("teamplay_lockonrestart") && teams_matter) { lockteams = 1; -- 2.39.2