]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/tturrets.qc
Improve weapon icon distribution
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / tturrets.qc
index 440067ada15d155c3523e4afbe73fba2d5936dd2..d2469851ca53f21c813d5bd629b01833f57f1847 100644 (file)
@@ -1,3 +1,8 @@
+#include "tturrets.qh"
+#include "waypointsprites.qh"
+
+#include "../server/movelib.qh"
+
 string tid2info_base;
 string tid2info_head;
 string tid2info_name;
@@ -13,7 +18,7 @@ void turrets_precache()
     turret_precache(TID_COMMON);
 }
 
-void turret_precache(float _tid)
+void turret_precache(int _tid)
 {
     if (!turret_is_precache[TID_COMMON])
     {
@@ -254,7 +259,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)
@@ -333,7 +338,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)),
@@ -421,7 +426,6 @@ void turret_ewheel_draw()
         te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
 }
 
-void(entity e, entity tagentity, string tagname) setattachment = #443;
 void turret_construct()
 {
     if(self.tur_head == world)
@@ -596,8 +600,7 @@ void turret_die()
 
 void ent_turret()
 {
-    float sf;
-    sf = ReadByte();
+    int sf = ReadByte();
 
        if(sf & TNSF_SETUP)
        {
@@ -665,8 +668,7 @@ void ent_turret()
 
     if(sf & TNSF_STATUS)
     {
-        float _tmp;
-        _tmp = ReadByte();
+        int _tmp = ReadByte();
         if(_tmp != self.team)
         {
             self.team = _tmp;