]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge remote branch 'origin/fruitiex/fruitbalance'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index de5aad9d48311eaa69f1f2ea7f330063fd0291c5..9feef58cc8738836ded4e6b168adf4c8e2e8786d 100644 (file)
@@ -136,6 +136,7 @@ void CSQC_Init(void)
 
        // precaches
        Projectile_Precache();
+       Hook_Precache();
        GibSplash_Precache();
        Casings_Precache();
        DamageInfo_Precache();
@@ -923,6 +924,9 @@ void(float bIsNewEntity) CSQC_Ent_Update =
                case ENT_CLIENT_WARPZONE: WarpZone_Read(bIsNewEntity); break;
                case ENT_CLIENT_WARPZONE_CAMERA: WarpZone_Camera_Read(bIsNewEntity); break;
                case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break;
+               case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
+               case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;
+               case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
                default:
                        error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));
                        break;
@@ -1022,9 +1026,18 @@ void Ent_Init()
 
        nb_pb_period = ReadByte() / 32; //Accuracy of 1/32th
 
-       hook_shotorigin_x = ReadCoord();
-       hook_shotorigin_y = ReadCoord();
-       hook_shotorigin_z = ReadCoord();
+       hook_shotorigin[0] = decompressShotOrigin(ReadInt24_t());
+       hook_shotorigin[1] = decompressShotOrigin(ReadInt24_t());
+       hook_shotorigin[2] = decompressShotOrigin(ReadInt24_t());
+       hook_shotorigin[3] = decompressShotOrigin(ReadInt24_t());
+       electro_shotorigin[0] = decompressShotOrigin(ReadInt24_t());
+       electro_shotorigin[1] = decompressShotOrigin(ReadInt24_t());
+       electro_shotorigin[2] = decompressShotOrigin(ReadInt24_t());
+       electro_shotorigin[3] = decompressShotOrigin(ReadInt24_t());
+       gauntlet_shotorigin[0] = decompressShotOrigin(ReadInt24_t());
+       gauntlet_shotorigin[1] = decompressShotOrigin(ReadInt24_t());
+       gauntlet_shotorigin[2] = decompressShotOrigin(ReadInt24_t());
+       gauntlet_shotorigin[3] = decompressShotOrigin(ReadInt24_t());
 
        if(forcefog)
                strunzone(forcefog);
@@ -1037,6 +1050,9 @@ void Ent_Init()
        g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord();
        g_balance_grenadelauncher_secondary_bouncestop = ReadCoord();
 
+       nex_scope = !ReadByte();
+       campingrifle_scope = !ReadByte();
+
        if(!postinit)
                PostInit();
 }
@@ -1262,6 +1278,7 @@ void Net_WeaponComplain() {
        complain_weapon_type = ReadByte();
 
        complain_weapon_time = time;
+       weapontime = time; // ping the weapon panel
 }
 
 // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
@@ -1290,10 +1307,6 @@ float CSQC_Parse_TempEntity()
                        Net_ReadRace();
                        bHandled = true;
                        break;
-               case 13: // TE_BEAM
-                       Net_GrapplingHook();
-                       bHandled = true;
-                       break;
                case TE_CSQC_SPAWN:
                        Net_ReadSpawn();
                        bHandled = true;
@@ -1338,6 +1351,15 @@ float CSQC_Parse_TempEntity()
                        Net_WeaponComplain();
                        bHandled = true;
                        break;
+               case TE_CSQC_NEX_VELOCITY:
+                       nex_minvelocity = ReadShort();
+                       nex_maxvelocity = ReadShort();
+                       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;