void VehicleRacerDraw()
{
- //Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
Movetype_Physics_NoMatchServer();
- self.drawmask = MASK_NORMAL;
+ self.drawmask = MASK_NORMAL;
}
void VehicleRacerRemove()
if(bIsNew)
{
setmodel(self, "models/vehicles/wakizashi.dpm");
- self.move_movetype = MOVETYPE_BOUNCE;
+ self.move_movetype = MOVETYPE_BOUNCE;
self.entremove = VehicleRacerRemove;
- setsize(self, '-60 -60 -20', '60 60 20');
+ setsize(self, '-60 -60 -20', '60 60 20');
self.draw = VehicleRacerDraw;
self.scale = 0.5;
}
-
+
self.cnt = ReadByte();
-
+
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
-
+
self.velocity_x = ReadCoord();
self.velocity_y = ReadCoord();
self.velocity_z = ReadCoord();
self.move_origin = self.origin;
self.move_velocity = self.velocity;
self.move_angles = self.angles;
-
+
setorigin(self, self.origin);
}
hud_id = bound(HUD_SPIDERBOT, ReadByte(), HUD_RAPTOR);
// Init auxiliary crosshairs
-//#if 1
entity axh;
for(i = 0; i < MAX_AXH; ++i)
{
axh.alpha = 1;
AuxiliaryXhair[i] = axh;
}
-/*
-#else
- for(i = 0; i < MAX_AXH; ++i)
- {
- if(AuxiliaryXhair[i] != world && !wasfreed(AuxiliaryXhair[i]))
- remove(AuxiliaryXhair[i]);
-
- AuxiliaryXhair[i] = spawn();
- AuxiliaryXhair[i].draw2d = Draw_Not;
- AuxiliaryXhair[i].drawmask = MASK_NORMAL;
- AuxiliaryXhair[i].axh_drawflag = DRAWFLAG_ADDITIVE;
- AuxiliaryXhair[i].axh_fadetime = 0.1;
- AuxiliaryXhair[i].axh_image = "gfx/vehicles/axh-ring.tga";
- AuxiliaryXhair[i].axh_scale = 1;
- AuxiliaryXhair[i].alpha = 1;
- }
-#endif
-*/
+
switch(hud_id)
{
case HUD_SPIDERBOT:
break;
}
}
+#define HUD_GETSTATS \
+ float health = getstati(STAT_VEHICLESTAT_HEALTH); \
+ float shield = getstati(STAT_VEHICLESTAT_SHIELD); \
+ float energy = getstati(STAT_VEHICLESTAT_ENERGY); \
+ float ammo1 = getstati(STAT_VEHICLESTAT_AMMO1); \
+ float reload1 = getstati(STAT_VEHICLESTAT_RELOAD1); \
+ float ammo2 = getstati(STAT_VEHICLESTAT_AMMO2); \
+ float reload2 = getstati(STAT_VEHICLESTAT_RELOAD2);
void CSQC_SPIDER_HUD()
{
- float rockets, reload, heat, hp, shield;
vector picsize, hudloc;
// Fetch health & ammo stats
- hp = bound(0,getstatf(STAT_VEHICLESTAT_HEALTH), 1);
- shield = bound(0,getstatf(STAT_VEHICLESTAT_SHIELD), 1);
- heat = min(getstatf(STAT_VEHICLESTAT_RELOAD1), 2);
- rockets = getstati(STAT_VEHICLESTAT_AMMO2);
- reload = min(getstatf(STAT_VEHICLESTAT_RELOAD2), 1);
-
-
+ HUD_GETSTATS
+
hudloc_y = 4;
hudloc_x = 4;
- drawfill('130 28 0', ('115 0 0' * hp) + '0 10 0', hp * '0 1 0' + (1 - hp) * '1 0 0', 0.5, DRAWFLAG_NORMAL);
+
picsize = drawgetimagesize(spider_h) * 0.5;
drawpic(hudloc, spider_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
picsize = drawgetimagesize(spider_a2) * 0.5;
drawpic(hudloc + '120 96 0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '145 19 0', strcat(ftos(rint(hp * 100)), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '175 34 0', strcat(ftos(rint(shield * 100)), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '136 102 0', strcat(ftos(100 - rint(heat * 100)), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '136 102 0', strcat(ftos(ammo1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
picsize = drawgetimagesize(spider_a1) * 0.85;
- if(rockets == 9)
+ if(ammo2 == 9)
{
drawpic(hudloc + '132 54 0', spider_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '179 69 0', strcat(ftos(rint(reload * 100)), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
}
else
{
drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '179 69 0', strcat(ftos(9 - rockets), "/8"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '179 69 0', strcat(ftos(9 - ammo2), " / 8"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
}
picsize = drawgetimagesize(spider_b) * 0.5;
hudloc_y = 10.5;
hudloc_x = 10.5;
-
+
+ ammo1 /= 100;
+ shield /= 100;
+ health /= 100;
+ reload2 /= 100;
+
drawpic(hudloc, spider_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
- drawpic(hudloc, spider_b, picsize, '0 1 0' * hp + '1 0 0' * (1 - hp), 1, DRAWFLAG_NORMAL);
- drawpic(hudloc, spider_r, picsize, '1 1 1' * reload + '1 0 0' * (1 - reload), 1, DRAWFLAG_NORMAL);
- drawpic(hudloc, spider_g, picsize, '1 1 1' * (1 - heat) + '1 0 0' * heat, 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, spider_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, spider_r, picsize, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, spider_g, picsize, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), 1, DRAWFLAG_NORMAL);
if (scoreboard_showscores)
{
if(autocvar_r_letterbox)
return;
-
- float reload, hp, shield, energy;
+
vector picsize, hudloc, vel;
float movedt;
vector where;
- // Fetch health & ammo stats
- hp = bound(0,getstatf(STAT_VEHICLESTAT_HEALTH), 1);
- shield = bound(0,getstatf(STAT_VEHICLESTAT_SHIELD), 1);
- reload = min(getstatf(STAT_VEHICLESTAT_RELOAD1), 1);
- energy = min(getstatf(STAT_VEHICLESTAT_ENERGY), 1);
+ // Fetch health & ammo stats
+ HUD_GETSTATS
+
// Draw the crosshairs
picsize = drawgetimagesize("gfx/vehicles/axh-cross.tga");
picsize_x *= 0.75;
picsize = drawgetimagesize(spider_a2) * 0.5;
drawpic(hudloc + '120 96 0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '145 19 0', strcat(ftos(rint(hp * 100)), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '175 34 0', strcat(ftos(rint(shield * 100)), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '136 102 0', strcat(ftos(rint(energy * 100)), "%"),'15 15 0','0.5 0.5 1', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '136 102 0', strcat(ftos(energy), "%"),'15 15 0','0.5 0.5 1', 1, DRAWFLAG_NORMAL);
+ health /= 100;
+ shield /= 100;
+ energy /= 100;
picsize = drawgetimagesize(spider_a1) * 0.85;
- if(reload == 1)
+ if(reload2 == 100)
{
drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '179 69 0', strcat(ftos(rint(reload * 100)), "%"),'14 14 0','0 1 0', 0.5, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','0 1 0', 0.5, DRAWFLAG_NORMAL);
}
else
{
drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '179 69 0', strcat(ftos(rint(reload * 100)), "%"),'14 14 0','0 0 1', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','0 0 1', 1, DRAWFLAG_NORMAL);
}
picsize = drawgetimagesize(raptor_b) * 0.5;
hudloc_y = 10.5;
hudloc_x = 10.5;
-
+ reload1 = reload2 / 100;
drawpic(hudloc, raptor_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
- drawpic(hudloc, raptor_b, picsize, '0 1 0' * hp + '1 0 0' * (1 - hp), 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, raptor_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
drawpic(hudloc, raptor_g1, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
- drawpic(hudloc, raptor_g2, picsize, '1 1 1' * reload + '1 0 0' * (1 - reload), 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, raptor_g2, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL);
if(!dropmark)
{
dropmark.gravity = 1;
}
- if(reload == 1)
+ if(reload2 == 100)
{
where = dropmark.origin;
setorigin(dropmark, pmove_org);
void CSQC_WAKIZASHI_HUD()
{
- // 0--1 floats. 1 = 100%, 0.6 = 50%.
- float health, shield, energy, rockets;
vector picsize, hudloc;
picsize = drawgetimagesize(SPIDER_CROSS);
picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_NORMAL);
+ /*
health = min(getstatf(STAT_VEHICLESTAT_HEALTH), 1);
shield = min(getstatf(STAT_VEHICLESTAT_SHIELD), 1);
energy = min(getstatf(STAT_VEHICLESTAT_ENERGY), 1);
rockets = bound(0,getstatf(STAT_VEHICLESTAT_RELOAD1), 1);
-
+ */
+
+ HUD_GETSTATS
+
hudloc_y = 4;
hudloc_x = 4;
drawpic(hudloc + '116 92 0', waki_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '145 19 0', strcat(ftos(rint(health * 100)), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '175 34 0', strcat(ftos(rint(shield * 100)), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
-
- drawstring(hudloc + '136 102 0', strcat(ftos(rint(energy * 100)), "%"),'14 14 0','1 1 1', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '136 102 0', strcat(ftos(energy), "%"),'14 14 0','1 1 1', 1, DRAWFLAG_NORMAL);
picsize = drawgetimagesize(waki_a1) * 0.75;
- if(rockets == 1)
+ if(reload1 == 100)
{
drawpic(hudloc + '140 55 0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
drawpic(hudloc + '144 59 0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
{
drawpic(hudloc + '140 55 0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
drawpic(hudloc + '144 59 0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
- drawstring(hudloc + '165 69 0', strcat(ftos(rint(rockets * 100)), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
+ drawstring(hudloc + '165 69 0', strcat(ftos(reload1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
}
picsize = drawgetimagesize(waki_b) * 0.5;
hudloc_y = 10.5;
hudloc_x = 10.5;
-
+
+ health /= 100;
+ energy /= 100;
+ shield /= 100;
+ reload1 /= 100;
+
drawpic(hudloc, waki_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
- drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
- drawpic(hudloc, waki_r, picsize, '1 1 1' * rockets + '1 0 0' * (1 - rockets), 1, DRAWFLAG_NORMAL);
- drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, waki_r, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL);
+ drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
if (scoreboard_showscores)
{
void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
{
entity sfrag;
-
+
sfrag = spawn();
setmodel(sfrag, "models/vehicles/clusterbomb_fragment.md3");
setorigin(sfrag, _org);
-
+
sfrag.move_movetype = MOVETYPE_BOUNCE;
sfrag.gravity = 0.15;
sfrag.solid = SOLID_CORPSE;
sfrag.move_velocity = _vel;
sfrag.move_avelocity = prandomvec() * vlen(sfrag.move_velocity);
sfrag.angles = self.move_angles = _ang;
-
+
sfrag.move_time = time;
sfrag.damageforcescale = 4;
sfrag.nextthink = time + 3;
sfrag.cnt = time + 2;
sfrag.drawmask = MASK_NORMAL;
-
-
+
+
}
-
\ No newline at end of file
float autocvar_g_vehicle_spiderbot_respawntime;
-//float autocvar_g_vehicle_spiderbot_crush_dmg;
-//float autocvar_g_vehicle_spiderbot_crush_force;
-
float autocvar_g_vehicle_spiderbot_speed_stop;
float autocvar_g_vehicle_spiderbot_speed_strafe;
float autocvar_g_vehicle_spiderbot_speed_walk;
float autocvar_g_vehicle_spiderbot_minigun_damage;
float autocvar_g_vehicle_spiderbot_minigun_refire;
float autocvar_g_vehicle_spiderbot_minigun_spread;
-float autocvar_g_vehicle_spiderbot_minigun_cooldown;
-float autocvar_g_vehicle_spiderbot_minigun_heat;
+float autocvar_g_vehicle_spiderbot_minigun_ammo_cost;
+float autocvar_g_vehicle_spiderbot_minigun_ammo_max;
+float autocvar_g_vehicle_spiderbot_minigun_ammo_regen;
+float autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause;
+
float autocvar_g_vehicle_spiderbot_rocket_damage;
float autocvar_g_vehicle_spiderbot_rocket_edgedamage;
return;
crosshair_trace(self.owner);
-//normalize(v_forward + (v_up * 0.5) + randomvec() * 0.25) * autocvar_g_vehicle_spiderbot_rocket_speed,
+
v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
rocket.think = spiderbot_rocket_guided;
rocket.nextthink = time;
rocket.cnt = time + autocvar_g_vehicle_spiderbot_rocket_lifetime;
-
self.tur_head.frame += 1;
if (self.tur_head.frame == 9)
self.gun2.cnt = time + self.attack_finished_single;
}
-void spiderbot_minigun_fire(entity gun, float trail)
-{
- vector v;
-
- v = gettaginfo(gun, gettagindex(gun,"barrels"));
- v_forward = normalize(v_forward);
- v += v_forward * 50;
-
- fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
- autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_SBMINIGUN, 0);
-
- if(trail)
- {
- sound (gun, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
- trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
- pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
- //pointparticles(particleeffectnum("spiderbot_minigun_impact"), trace_endpos, trace_plane_normal * 2500,1);
- }
-}
-
-void spiderbot_miniguns_do()
-{
- float ftmp;
-
- if((self.vehicle_reload1 == 1) || (!self.owner.BUTTON_ATCK))
- {
- ftmp = 1 / autocvar_g_vehicle_spiderbot_minigun_cooldown * sys_frametime;
- self.owner.vehicle_reload1 = max(self.owner.vehicle_reload1 - ftmp, 0);
- if(self.owner.vehicle_reload1 <= 0)
- self.vehicle_reload1 = 0;
-
- return;
- }
-
- if (self.owner.BUTTON_ATCK)
- {
-
- // Animate miniguns
- self.gun1.angles_z += (1440 * sys_frametime);
- self.gun2.angles_z -= (1440 * sys_frametime);
- if(self.gun1.angles_z >= 360)
- {
- self.gun1.angles_z = 0;
- self.gun2.angles_z = 360;
- }
-
- if (self.tur_head.attack_finished_single < time)
- {
- // Fire bullets, alternating trails left<->right
- self = self.owner;
- if(self.misc_bulletcounter == 1)
- {
- spiderbot_minigun_fire(self.vehicle.gun1, 0);
- spiderbot_minigun_fire(self.vehicle.gun2, 1);
- self.misc_bulletcounter = 0;
- }
- else
- {
- spiderbot_minigun_fire(self.vehicle.gun1, 1);
- spiderbot_minigun_fire(self.vehicle.gun2, 0);
- self.misc_bulletcounter += 1;
- }
- self = self.vehicle;
-
- ftmp = autocvar_g_vehicle_spiderbot_minigun_refire / autocvar_g_vehicle_spiderbot_minigun_heat;
- self.owner.vehicle_reload1 += ftmp;
-
- if(self.owner.vehicle_reload1 >= 1)
- {
- self.vehicle_reload1 = 1;
- self.owner.vehicle_reload1 = 1;
- self.tur_head.attack_finished_single = autocvar_g_vehicle_spiderbot_minigun_cooldown + time;
- }
- else
- self.tur_head.attack_finished_single = autocvar_g_vehicle_spiderbot_minigun_refire + time;
- }
- return;
- }
-}
-
float spiderbot_frame()
{
vector ad;
}
self = spider;
-
- //vector v;
- //v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
- //te_lightning1(world, v, v + normalize(v_forward + (v_up * 0.5) + randomvec() * 0.25) * autocvar_g_vehicle_spiderbot_rocket_speed);
+
crosshair_trace(player);
//UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload2) + ('0 1 0' * (1 - player.vehicle_reload2)), 2);
ad_y = bound(-ftmp, ad_y, ftmp);
spider.tur_head.angles_y = bound(autocvar_g_vehicle_spiderbot_head_turnlimit * -1, spider.tur_head.angles_y + ad_y, autocvar_g_vehicle_spiderbot_head_turnlimit);
-
// Pitch head
ad = vectoangles(normalize(trace_endpos - gettaginfo(spider.tur_head,gettagindex(spider.tur_head,"tag_hud")))) - (spider.tur_head.angles + spider.angles);
if(ad_x > 180) ad_x -= 360;
if(ad_x < -180) ad_x += 360;
-
ftmp = autocvar_g_vehicle_spiderbot_head_pitchspeed * sys_frametime;
ad_x = bound(ftmp * -1, ad_x, ftmp);
spider.tur_head.angles_x = bound(autocvar_g_vehicle_spiderbot_head_pitchlimit_down, spider.tur_head.angles_x + ad_x, autocvar_g_vehicle_spiderbot_head_pitchlimit_up);
-
-
// Turn Body
ftmp = autocvar_g_vehicle_spiderbot_turnspeed * sys_frametime;
ftmp = bound(-ftmp, spider.tur_head.angles_y, ftmp);
-
#endif
makevectors(spider.angles + '-1 0 0' * spider.angles_x);
self.angles_x = bound(-45, self.angles_x, 45);
self.angles_z = bound(-45, self.angles_z, 45);
+
+ if(player.BUTTON_ATCK)
+ {
+ spider.cnt = time;
+ if(spider.vehicle_ammo1 >= autocvar_g_vehicle_spiderbot_minigun_ammo_cost && spider.tur_head.attack_finished_single <= time)
+ {
+ entity gun;
+ vector v;
+ spider.misc_bulletcounter += 1;
+
+ self = player;
+
+ mod(spider.misc_bulletcounter, 2) ? gun = spider.gun1 : gun = spider.gun2;
+ v = gettaginfo(gun, gettagindex(gun, "barrels"));
+ v_forward = normalize(v_forward);
+ v += v_forward * 50;
+
+ fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
+ autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_SBMINIGUN, 0);
+
+ sound (gun, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
+ trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
+ pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
+
+ self = spider;
+
+ spider.vehicle_ammo1 -= autocvar_g_vehicle_spiderbot_minigun_ammo_cost;
+ spider.tur_head.attack_finished_single = time + autocvar_g_vehicle_spiderbot_minigun_refire;
+ player.vehicle_ammo1 = (spider.vehicle_ammo1 / autocvar_g_vehicle_spiderbot_minigun_ammo_max) * 100;
+ }
+ }
+ else
+ vehicles_regen(cnt, vehicle_ammo1, autocvar_g_vehicle_spiderbot_minigun_ammo_max,
+ autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause,
+ autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime);
- spiderbot_miniguns_do();
+ dprint("1: ammo1:", ftos(spider.vehicle_ammo1), "\n");
+
spiderbot_rocket_do();
if(self.vehicle_flags & VHF_SHIELDREGEN)