]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix an "unknown temp entity" error
authorRudolf Polzer <divverent@alientrap.org>
Fri, 24 Dec 2010 22:55:08 +0000 (23:55 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 24 Dec 2010 22:55:08 +0000 (23:55 +0100)
qcsrc/client/Main.qc
qcsrc/server/cl_client.qc

index 04ab52e1474388782fabcc7c93970ae0c6fd45a6..03b96c7aa76ab35c8435b32a037dfb7e997ab64c 100644 (file)
@@ -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;
index fea11ec930d644bd47feadd9804851e1581f73df..98b512b9649dda0d5be5ebdce6bedfd258a2e2ad 100644 (file)
@@ -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);