]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/cl_weaponsystem.qc
Fix compile issues with latest fteqcc
[voretournament/voretournament.git] / data / qcsrc / server / cl_weaponsystem.qc
index 1434ac32ab42ab15a5c442233c4e3e3c9c6d235c..61763b7139bc00b0687edf25bae74b4ad4a94eaf 100644 (file)
@@ -752,14 +752,13 @@ void CL_Weaponentity_Think()
 \r
        }\r
 \r
-       // create or update the lasertarget entity\r
-\r
        // if we are a micro or macro, size the weapon model accordingly\r
        if(cvar("g_healthsize") && cvar("g_healthsize_weapon_scalefactor"))\r
+       if(self.model != "")\r
        {\r
                self.weaponentity.scale = (1 + cvar("g_healthsize_weapon_scalefactor")) - cvar("g_healthsize_weapon_scalefactor") * self.owner.scale;\r
-               if(self.weaponentity.scale <= 0)\r
-                       self.weaponentity.scale = 0.00001; // 0 becomes 1 for scale, so do this to allow almost 0 scale\r
+               if(self.weaponentity.scale < 0.1)\r
+                       self.weaponentity.scale = 0.1; // stuff breaks if scale is smaller than this\r
                self.weaponentity.origin_z = (1 - self.weaponentity.scale) * cvar("g_healthsize_weapon_scalefactor_pos");\r
        }\r
 };\r
@@ -1589,7 +1588,7 @@ void W_DecreaseAmmo(.float ammo_type, float ammo_use, float ammo_reload)
        if(ammo_reload)\r
        {\r
                self.clip_load -= ammo_use;\r
-               self.weapon_load[self.weapon] = self.clip_load;\r
+               self.(weapon_load[self.weapon]) = self.clip_load;\r
        }\r
        else\r
                self.(self.current_ammo) -= ammo_use;\r
@@ -1606,7 +1605,7 @@ void W_ReloadedAndReady()
        // if we are inside the stomach, don't allow reloading, and schedule the weapon to reload once when we're out\r
        if(self.stat_eaten)\r
        {\r
-               self.clip_load = self.weapon_load[self.weapon] = -1;\r
+               self.clip_load = self.(weapon_load[self.weapon]) = -1;\r
                w_ready(); // don't keep executing each frame\r
                return;\r
        }\r
@@ -1626,7 +1625,7 @@ void W_ReloadedAndReady()
                        self.(self.current_ammo) -= 1;\r
                }\r
        }\r
-       self.weapon_load[self.weapon] = self.clip_load;\r
+       self.(weapon_load[self.weapon]) = self.clip_load;\r
 \r
        // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon,\r
        // then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there,\r
@@ -1718,5 +1717,5 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
        if(self.clip_load < 0)\r
                self.clip_load = 0;\r
        self.old_clip_load = self.clip_load;\r
-       self.clip_load = self.weapon_load[self.weapon] = -1;\r
+       self.clip_load = self.(weapon_load[self.weapon]) = -1;\r
 }
\ No newline at end of file