From 3331fb37d64d6914124664410daa386edc128d19 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 24 Dec 2010 23:55:08 +0100 Subject: [PATCH] fix an "unknown temp entity" error --- qcsrc/client/Main.qc | 6 ++---- qcsrc/server/cl_client.qc | 10 +--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 04ab52e14..03b96c7aa 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -1097,6 +1097,8 @@ void Ent_Init() serverflags = ReadByte(); + cr_maxbullets = ReadByte(); + if(!postinit) PostInit(); } @@ -1395,10 +1397,6 @@ float CSQC_Parse_TempEntity() Net_WeaponComplain(); bHandled = true; break; - case TE_CSQC_CR_MAXBULLETS: - cr_maxbullets = ReadByte(); - bHandled = true; - break; default: // No special logic for this temporary entity; return 0 so the engine can handle it bHandled = false; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index fea11ec93..98b512b96 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -6,13 +6,6 @@ void send_CSQC_teamnagger() { WriteByte(0, TE_CSQC_TEAMNAGGER); } -void send_CSQC_cr_maxbullets(entity e) { - msg_entity = e; - WriteByte(MSG_ONE, SVC_TEMPENTITY); - WriteByte(MSG_ONE, TE_CSQC_CR_MAXBULLETS); - WriteByte(MSG_ONE, autocvar_g_balance_campingrifle_magazinecapacity); -} - void Announce(string snd) { WriteByte(MSG_ALL, SVC_TEMPENTITY); WriteByte(MSG_ALL, TE_CSQC_ANNOUNCE); @@ -1114,6 +1107,7 @@ float ClientInit_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not WriteByte(MSG_ENTITY, autocvar_g_balance_campingrifle_secondary); // client has to know if it should zoom or not WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not + WriteByte(MSG_ENTITY, autocvar_g_balance_campingrifle_magazinecapacity); // rifle max bullets return TRUE; } @@ -1741,8 +1735,6 @@ void ClientConnect (void) else if(autocvar_sv_teamnagger && !(autocvar_bot_vs_human && (c3==-1 && c4==-1)) && !g_ca) // teamnagger is currently bad for ca send_CSQC_teamnagger(); - send_CSQC_cr_maxbullets(self); - CheatInitClient(); PlayerStats_AddPlayer(self); -- 2.39.2