]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/tturrets.qc
Merge remote-tracking branch 'origin/master' into terencehill/menu_remove_tab_title
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / tturrets.qc
index c46d80dce85caca48afbd6f6c7a46e6a21e048cc..b74024d508aa09b0bf5dab2b660447aa5f2d5f33 100644 (file)
@@ -1,22 +1,24 @@
-#if defined(CSQC)
-    #include "../dpdefs/csprogsdefs.qc"
-    #include "Defs.qc"
-    #include "../common/constants.qh"
-    #include "../warpzonelib/mathlib.qh"
-    #include "../common/teams.qh"
-    #include "../common/buffs.qh"
-    #include "autocvars.qh"
-    #include "teamradar.qh"
-    #include "movetypes.qh"
-    #include "tturrets.qh"
-    #include "../server/tturrets/include/turrets_early.qh"
-    #include "main.qh"
-    #include "../csqcmodellib/common.qh"
-    #include "../csqcmodellib/cl_model.qh"
-    #include "../server/t_items.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "tturrets.qh"
+#include "_all.qh"
+
+#include "hud.qh"
+#include "movelib.qh"
+#include "movetypes.qh"
+#include "prandom.qh"
+#include "teamradar.qh"
+#include "waypointsprites.qh"
+
+#include "../common/teams.qh"
+
+#include "../server/tturrets/include/turrets_early.qh"
+
+#include "../warpzonelib/anglestransform.qh"
+#include "../warpzonelib/mathlib.qh"
+
+.vector colormod;
+.float cnt;
+.float alpha;
+.float gravity;
 
 string tid2info_base;
 string tid2info_head;
@@ -46,7 +48,6 @@ void turret_precache(int _tid)
         precache_model ("models/turrets/head-gib2.md3");
         precache_model ("models/turrets/head-gib3.md3");
         precache_model ("models/turrets/head-gib4.md3");
-        precache_model ("models/turrets/terrainbase.md3");
         precache_model ("models/turrets/base.md3");
         precache_model ("models/turrets/rocket.md3");
     }
@@ -178,7 +179,7 @@ void turret_remove()
     self.tur_head = world;
 }
 
-.vector glowmod;
+class(Turret) .vector glowmod;
 void turret_changeteam()
 {
        switch(self.team - 1)
@@ -274,7 +275,7 @@ void turret_draw2d()
         || o.x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))
         || o.y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
             return; // Dont draw wp's for turrets out of view
-        o_z = 0;
+        o.z = 0;
         if(hud != HUD_NORMAL)
         {
             switch(hud)
@@ -353,7 +354,7 @@ void turret_draw2d()
        || o.y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
            return; // Dont draw wp's for turrets out of view
 
-       o_z = 0;
+       o.z = 0;
 
        float edgedistance_min, crosshairdistance;
                edgedistance_min = min((o.y - (vid_conheight * waypointsprite_edgeoffset_top)),
@@ -683,8 +684,7 @@ void ent_turret()
 
     if(sf & TNSF_STATUS)
     {
-        float _tmp;
-        _tmp = ReadByte();
+        int _tmp = ReadByte();
         if(_tmp != self.team)
         {
             self.team = _tmp;