]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/tturrets.qc
New vehicle system based on weapons system
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / tturrets.qc
index 6f3b030502196171db72a24520b89fb7a9713979..a8ebd03c1f42d28b64d950dfa28fe04fd3ccf876 100644 (file)
@@ -163,22 +163,22 @@ void turret_changeteam()
 {      
        switch(self.team - 1)
        {
-        case COLOR_TEAM1: // Red
+        case NUM_TEAM_1: // Red
             self.glowmod = '2 0 0';
             self.teamradar_color = '1 0 0';
             break;
 
-        case COLOR_TEAM2: // Blue
+        case NUM_TEAM_2: // Blue
             self.glowmod = '0 0 2';
             self.teamradar_color = '0 0 1';
             break;
 
-        case COLOR_TEAM3: // Yellow
+        case NUM_TEAM_3: // Yellow
             self.glowmod = '1 1 0';
             self.teamradar_color = '1 1 0';
             break;
 
-        case COLOR_TEAM4: // Pink
+        case NUM_TEAM_4: // Pink
             self.glowmod = '1 0 1';
             self.teamradar_color = '1 0 1';
             break;
@@ -257,21 +257,13 @@ void turret_draw2d()
         o_z = 0;
         if(hud != HUD_NORMAL)
         {        
-            switch(hud)
-            {
-                case HUD_SPIDERBOT:
-                case HUD_WAKIZASHI:
-                case HUD_RAPTOR:
-                case HUD_BUMBLEBEE:
-                    if(self.turret_type == TID_EWHEEL || self.turret_type == TID_WALKER)
-                        txt = "gfx/vehicles/vth-mover.tga";
-                    else
-                        txt = "gfx/vehicles/vth-stationary.tga";
+                       if(self.turret_type == TID_EWHEEL || self.turret_type == TID_WALKER)
+                               txt = "gfx/vehicles/vth-mover.tga";
+                       else
+                               txt = "gfx/vehicles/vth-stationary.tga";
                         
-                    vector pz = drawgetimagesize(txt) * 0.25;
-                    drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.75, DRAWFLAG_NORMAL);
-                    break;
-            }
+                       vector pz = drawgetimagesize(txt) * 0.25;
+                       drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.75, DRAWFLAG_NORMAL);
         }
        }
     
@@ -509,7 +501,7 @@ void turret_gibboom()
 {
     float i;
     
-    sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
     pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
 
     for (i = 1; i < 5; i = i + 1)
@@ -556,7 +548,7 @@ entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, flo
 void turret_die()
 {    
     
-    sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
     pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
     turret_tid2info(self.turret_type);
     if (!autocvar_cl_nogibs)