);
#else
+const float SBRM_FIRST = 1;
+const float SBRM_VOLLY = 1;
+const float SBRM_GUIDE = 2;
+const float SBRM_ARTILLERY = 3;
+const float SBRM_LAST = 3;
+
#ifdef SVQC
float autocvar_g_vehicle_spiderbot;
float autocvar_g_vehicle_spiderbot_minigun_ammo_regen;
float autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause;
float autocvar_g_vehicle_spiderbot_minigun_force;
-float autocvar_g_vehicle_spiderbot_minigun_speed;
-float autocvar_g_vehicle_spiderbot_minigun_bulletconstant;
+float autocvar_g_vehicle_spiderbot_minigun_solidpenetration;
float autocvar_g_vehicle_spiderbot_rocket_damage;
float autocvar_g_vehicle_spiderbot_rocket_force;
float autocvar_g_vehicle_spiderbot_rocket_turnrate;
float autocvar_g_vehicle_spiderbot_rocket_lifetime;
-#define SBRM_FIRST 0
-#define SBRM_VOLLY 0
-#define SBRM_GUIDE 1
-#define SBRM_ARTILLERY 2
-#define SBRM_LAST 2
-
vector autocvar_g_vehicle_spiderbot_bouncepain;
void spiderbot_rocket_artillery()
if(self.wait != -10)
if(!self.owner.BUTTON_ATCK2)
return;
+
+ if(forbidWeaponUse(self.owner))
+ return;
v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
float ftmp;
if(intermission_running)
+ {
+ self.vehicle.velocity = '0 0 0';
return 1;
+ }
player = self;
spider = self.vehicle;
player.BUTTON_ZOOM = 0;
player.BUTTON_CROUCH = 0;
player.switchweapon = 0;
+ player.vehicle_weapon2mode = spider.vehicle_weapon2mode;
#if 1 // 0 to enable per-gun impact aux crosshairs
self.angles_x = bound(-autocvar_g_vehicle_spiderbot_tiltlimit, self.angles_x, autocvar_g_vehicle_spiderbot_tiltlimit);
self.angles_z = bound(-autocvar_g_vehicle_spiderbot_tiltlimit, self.angles_z, autocvar_g_vehicle_spiderbot_tiltlimit);
+ if(!forbidWeaponUse(player))
if(player.BUTTON_ATCK)
{
spider.cnt = time;
v_forward = normalize(v_forward);
v += v_forward * 50;
-//void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, float lifetime, float damage, float force, float dtype, float tracereffects, float gravityfactor, float bulletconstant)
-
- fireBallisticBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_speed,
- 5, autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0, autocvar_g_vehicle_spiderbot_minigun_bulletconstant);
-
- endFireBallisticBullet();
-
-// fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
-// autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_VH_SPID_MINIGUN, 0);
+ fireBullet(v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_solidpenetration,
+ autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN, 0);
sound (gun, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTEN_NORM);
//trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
self.colormod = self.tur_head.colormod = '-1 -1 -1';
self.frame = 10;
self.movetype = MOVETYPE_TOSS;
+
+ CSQCModel_UnlinkEntity(); // networking the death scene would be a nightmare
return TRUE;
}
self.vehicle_health = autocvar_g_vehicle_spiderbot_health;
self.vehicle_shield = autocvar_g_vehicle_spiderbot_shield;
self.max_health = self.vehicle_health;
+ self.pushable = TRUE; // spiderbot can use jumppads
return TRUE;
}
#endif // SVQC
#ifdef CSQC
+var float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6;
+var float autocvar_cl_vehicle_spiderbot_cross_size = 1;
#define spider_ico "gfx/vehicles/sbot.tga"
#define spider_rkt "gfx/vehicles/sbot_rpods.tga"
#define spider_mgun "gfx/vehicles/sbot_mguns.tga"
string spider_xhair; // = "gfx/vehicles/axh-special1.tga";
-#define SBRM_FIRST 1
-#define SBRM_VOLLY 1
-#define SBRM_GUIDE 2
-#define SBRM_ARTILLERY 3
-#define SBRM_LAST 3
-
float v_spiderbot(float req)
{
switch(req)
if(alarm1time < time)
{
alarm1time = time + 2;
- sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE);
+ vehicle_alarm(self, CH_PAIN_SINGLE, "vehicles/alarm.wav");
}
drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
}
drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
if(alarm1time)
{
- sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
+ vehicle_alarm(self, CH_PAIN_SINGLE, "misc/null.wav");
alarm1time = 0;
}
}
if(alarm2time < time)
{
alarm2time = time + 1;
- sound(self, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTEN_NONE);
+ vehicle_alarm(self, CH_PAIN_SINGLE, "vehicles/alarm_shield.wav");
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
if(alarm2time)
{
- sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
+ vehicle_alarm(self, CH_PAIN_SINGLE, "misc/null.wav");
alarm2time = 0;
}
}
HUD_DrawScoreboard();
else
{
- switch(weapon2mode)
+ switch(getstati(STAT_VEHICLESTAT_W2MODE))
{
case SBRM_VOLLY:
spider_xhair = "gfx/vehicles/axh-bracket.tga";