]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Healing gun target lock for bumblebee, make healray fatter, remove gunner static...
authorJakob MG <jakob_mg@hotmail.com>
Wed, 15 Aug 2012 16:46:54 +0000 (18:46 +0200)
committerJakob MG <jakob_mg@hotmail.com>
Wed, 15 Aug 2012 16:46:54 +0000 (18:46 +0200)
qcsrc/client/vehicles/vehicles.qc
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/vehicles.qc

index 0cf543e9c9649a07a8582f6f7327d10b36e54812..cbf8bda395fe5bca863a97e6e5a2b1f59e77edb4 100644 (file)
@@ -203,17 +203,17 @@ void Net_VehicleSetup()
             break;
 
         case HUD_BUMBLEBEE:
-            // Raygun
+            // Raygun-locked
             AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
-            AuxiliaryXhair[0].axh_scale   = 0.25;
+            AuxiliaryXhair[0].axh_scale   = 0.5;
             
             // Gunner1
-            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-ring.tga";
-            AuxiliaryXhair[1].axh_scale   = 0.25;
+            AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-target.tga";
+            AuxiliaryXhair[1].axh_scale   = 0.75;
             
             // Gunner2
-            AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-ring.tga";
-            AuxiliaryXhair[2].axh_scale   = 0.25;
+            AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-target.tga";
+            AuxiliaryXhair[2].axh_scale   = 0.75;
             break;        
         case HUD_BUMBLEBEE_GUN:
             // Plasma cannons
@@ -360,22 +360,7 @@ void CSQC_BUMBLE_HUD()
         drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     else
         drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-/*
-/*
-// Bomb bar
-    picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
-    picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
-    drawsetcliparea(hudloc_x + picloc_x, hudloc_y + picloc_y, picsize_x * reload1, vid_conheight);
-    drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-    drawresetcliparea();
-// ..  and icon
-    pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
-    picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
-    if(reload1 != 1)
-        drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-    else
-        drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL);
-*/
+
        if (scoreboard_showscores)
                HUD_DrawScoreboard();
     else
@@ -383,10 +368,9 @@ void CSQC_BUMBLE_HUD()
         picsize = draw_getimagesize(waki_xhair);
         picsize_x *= 0.5;
         picsize_y *= 0.5;
-
-
         drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
     }
+    
 }
 
 void CSQC_BUMBLE_GUN_HUD()
@@ -485,6 +469,7 @@ void CSQC_BUMBLE_GUN_HUD()
     drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * energy, vid_conheight);
     drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
     drawresetcliparea();
+    
 // ..  and icon
     picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale;
     picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
@@ -492,23 +477,10 @@ void CSQC_BUMBLE_GUN_HUD()
         drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     else
         drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-/*
-// Bomb bar
-    picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
-    picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
-    drawsetcliparea(hudloc_x + picloc_x, hudloc_y + picloc_y, picsize_x * reload1, vid_conheight);
-    drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-    drawresetcliparea();
-// ..  and icon
-    pic2size = draw_getimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
-    picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
-    if(reload1 != 1)
-        drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-    else
-        drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL);
-*/
+
        if (scoreboard_showscores)
                HUD_DrawScoreboard();
+    /*
     else
     {
         picsize = draw_getimagesize(waki_xhair);
@@ -518,6 +490,7 @@ void CSQC_BUMBLE_GUN_HUD()
 
         drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
     }
+    */
 }
 
 
index 94c9c040a9ca2d4d7f60297b1bcfb329034313f3..ce43a60ea4e5f17d8cc20d190aac1f336ce255b3 100644 (file)
@@ -463,11 +463,39 @@ float bumb_pilot_frame()
        pilot.velocity = pilot.movement  = vehic.velocity;
        setorigin(pilot, vehic.origin + '0 0 32');
 
+       if(vehic.tur_head.lock_time < time || vehic.tur_head.enemy.deadflag)
+               vehic.tur_head.enemy = world;
+
+       if(trace_ent)
+       if(trace_ent.movetype)
+       if(trace_ent.takedamage)
+       if(!trace_ent.deadflag)
+       {
+               if(teamplay)
+               {
+                       if(trace_ent.team == pilot.team)
+                       {
+                               vehic.tur_head.enemy = trace_ent;
+                               vehic.tur_head.lock_time = time + 1;
+                       }
+               }
+               else
+               {            
+                       vehic.tur_head.enemy = trace_ent;
+                       vehic.tur_head.lock_time = time + 0.5;
+               }
+       }
+               
+       if(vehic.tur_head.enemy)
+       {
+               trace_endpos = real_origin(vehic.tur_head.enemy);
+               UpdateAuxiliaryXhair(pilot, trace_endpos, '0 0.5 0', 0);                
+       }
+               
        vehicle_aimturret(vehic, trace_endpos, self.gun3, "fire",
                                          autocvar_g_vehicle_bumblebee_raygun_pitchlimit_down * -1,  autocvar_g_vehicle_bumblebee_raygun_pitchlimit_up,
                                          autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides * -1,  autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides,  autocvar_g_vehicle_bumblebee_raygun_turnspeed);
 
-
        if((pilot.BUTTON_ATCK || pilot.BUTTON_ATCK2) && vehic.vehicle_energy > autocvar_g_vehicle_bumblebee_raygun_dps * sys_frametime)
        {
 
@@ -824,7 +852,7 @@ void bumble_raygun_draw()
        for(i = -0.1; i < 0.2; i += 0.1)
        {
                df = DRAWFLAG_NORMAL; //((random() < 0.5) ? DRAWFLAG_ADDITIVE : DRAWFLAG_SCREEN);
-               sz = 2 + random() * 6;
+               sz = 5 + random() * 5;
                al = 0.25 + random() * 0.5;
                _vtmp1 = self.origin + _dir * _len * (0.25 + i);
                _vtmp1 += (randomvec() * (_len * 0.2) * (frametime * 2));       //self.raygun_l1;
@@ -840,7 +868,6 @@ void bumble_raygun_draw()
 
                Draw_CylindricLine(_vtmp1, self.move_origin +  randomvec() * 32, sz, "gfx/colors/white.tga", 1, 1, self.colormod, al, df, view_origin);
        }
-
 }
 
 void bumble_raygun_read(float bIsNew)
index 17007f7ffc183199420c1abafffa531e5d5b499a..7ea09861f8feb6be933866ff5ddde0ad598d0b8d 100644 (file)
@@ -1332,9 +1332,11 @@ void vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string _t
     vtmp = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(_vehic.angles), AnglesTransform_FromAngles(vtmp))) - _turrret.angles;
     vtmp = AnglesTransform_Normalize(vtmp, TRUE);
 
-    ftmp = _aimspeed * sys_frametime;
+    ftmp = _aimspeed * frametime;
+    
     vtmp_y = bound(-ftmp, vtmp_y, ftmp);
     vtmp_x = bound(-ftmp, vtmp_x, ftmp);
+
     _turrret.angles_y = bound(_rotlimit_min, _turrret.angles_y + vtmp_y, _rotlimit_max);    
     _turrret.angles_x = bound(_pichlimit_min, _turrret.angles_x + vtmp_x, _pichlimit_max);    
 }