1 const vector SPIDERBOT_MIN = '-75 -75 10';
2 const vector SPIDERBOT_MAX = '75 75 125';
5 float autocvar_g_vehicle_spiderbot_respawntime;
7 float autocvar_g_vehicle_spiderbot_speed_stop;
8 float autocvar_g_vehicle_spiderbot_speed_strafe;
9 float autocvar_g_vehicle_spiderbot_speed_walk;
10 float autocvar_g_vehicle_spiderbot_turnspeed;
11 float autocvar_g_vehicle_spiderbot_movement_inertia;
13 float autocvar_g_vehicle_spiderbot_springlength;
14 float autocvar_g_vehicle_spiderbot_springup;
15 float autocvar_g_vehicle_spiderbot_springblend;
17 float autocvar_g_vehicle_spiderbot_head_pitchlimit_down;
18 float autocvar_g_vehicle_spiderbot_head_pitchlimit_up;
19 float autocvar_g_vehicle_spiderbot_head_pitchspeed;
20 float autocvar_g_vehicle_spiderbot_head_turnlimit;
21 float autocvar_g_vehicle_spiderbot_head_turnspeed;
23 //float autocvar_g_vehicle_spiderbot_energy;
24 //float autocvar_g_vehicle_spiderbot_energy_regen;
25 //float autocvar_g_vehicle_spiderbot_energy_regen_pause;
27 float autocvar_g_vehicle_spiderbot_health;
28 float autocvar_g_vehicle_spiderbot_health_regen;
29 float autocvar_g_vehicle_spiderbot_health_regen_pause;
31 float autocvar_g_vehicle_spiderbot_shield;
32 float autocvar_g_vehicle_spiderbot_shield_regen;
33 float autocvar_g_vehicle_spiderbot_shield_regen_pause;
35 float autocvar_g_vehicle_spiderbot_minigun_damage;
36 float autocvar_g_vehicle_spiderbot_minigun_refire;
37 float autocvar_g_vehicle_spiderbot_minigun_spread;
38 float autocvar_g_vehicle_spiderbot_minigun_ammo_cost;
39 float autocvar_g_vehicle_spiderbot_minigun_ammo_max;
40 float autocvar_g_vehicle_spiderbot_minigun_ammo_regen;
41 float autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause;
43 float autocvar_g_vehicle_spiderbot_rocket_damage;
44 float autocvar_g_vehicle_spiderbot_rocket_force;
45 float autocvar_g_vehicle_spiderbot_rocket_radius;
46 float autocvar_g_vehicle_spiderbot_rocket_speed;
47 float autocvar_g_vehicle_spiderbot_rocket_refire;
48 float autocvar_g_vehicle_spiderbot_rocket_reload;
49 float autocvar_g_vehicle_spiderbot_rocket_health;
50 float autocvar_g_vehicle_spiderbot_rocket_noise;
51 float autocvar_g_vehicle_spiderbot_rocket_turnrate;
52 float autocvar_g_vehicle_spiderbot_rocket_lifetime;
54 void spiderbot_exit(float eject);
55 void spiderbot_enter();
56 void spiderbot_spawn();
58 void spiderbot_rocket_unguided()
60 vector newdir, olddir;
62 self.nextthink = time;
64 olddir = normalize(self.velocity);
65 newdir = normalize(self.pos1 - self.origin) + randomvec() * autocvar_g_vehicle_spiderbot_rocket_noise;
66 self.velocity = normalize(olddir + newdir * autocvar_g_vehicle_spiderbot_rocket_turnrate) * autocvar_g_vehicle_spiderbot_rocket_speed;
68 UpdateCSQCProjectile(self);
70 if (self.owner.deadflag != DEAD_NO || self.cnt < time || vlen(self.pos1 - self.origin) < 16)
74 void spiderbot_rocket_guided()
76 vector newdir, olddir;
78 self.nextthink = time;
80 if not (self.realowner.vehicle)
81 self.think = spiderbot_rocket_unguided;
83 crosshair_trace(self.realowner);
84 olddir = normalize(self.velocity);
85 newdir = normalize(trace_endpos - self.origin) + randomvec() * autocvar_g_vehicle_spiderbot_rocket_noise;
86 self.velocity = normalize(olddir + newdir * autocvar_g_vehicle_spiderbot_rocket_turnrate) * autocvar_g_vehicle_spiderbot_rocket_speed;
88 UpdateCSQCProjectile(self);
90 if (self.owner.deadflag != DEAD_NO || self.cnt < time)
94 void spiderbot_guide_release()
97 rkt = findchainentity(realowner, self.owner);
101 crosshair_trace(self.owner);
104 if(rkt.think == spiderbot_rocket_guided)
106 rkt.pos1 = trace_endpos;
107 rkt.think = spiderbot_rocket_unguided;
113 void spiderbot_rocket_do()
119 if (self.owner.BUTTON_ATCK2)
122 if (self.tur_head.frame == 9 || self.tur_head.frame == 1)
124 if(self.gun2.cnt < time && self.tur_head.frame == 9)
125 self.tur_head.frame = 1;
134 spiderbot_guide_release();
139 if(self.gun2.cnt > time)
142 if (self.tur_head.frame >= 9)
143 self.tur_head.frame = 1;
145 if not (self.owner.BUTTON_ATCK2)
148 crosshair_trace(self.owner);
150 v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
151 rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
152 v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
153 autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
154 DEATH_SBROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, FALSE);
156 rocket.cnt = time + 15;
157 rocket.classname = "spiderbot_rocket";
158 rocket.pos1 = trace_endpos;
159 rocket.think = spiderbot_rocket_guided;
160 rocket.nextthink = time;
161 rocket.cnt = time + autocvar_g_vehicle_spiderbot_rocket_lifetime;
163 self.tur_head.frame += 1;
164 if (self.tur_head.frame == 9)
165 self.attack_finished_single = autocvar_g_vehicle_spiderbot_rocket_reload;
167 self.attack_finished_single = autocvar_g_vehicle_spiderbot_rocket_refire;
169 self.gun2.cnt = time + self.attack_finished_single;
172 float spiderbot_frame()
175 entity player, spider;
179 spider = self.vehicle;
182 player.BUTTON_ZOOM = 0;
183 player.BUTTON_CROUCH = 0;
184 player.switchweapon = 0;
186 if(player.BUTTON_USE)
188 vehicles_exit(VHEF_NORMAL);
193 crosshair_trace(player);
194 //UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload2) + ('0 1 0' * (1 - player.vehicle_reload2)), 2);
196 player.v_angle_x *= -1;
197 ad = player.v_angle - (spider.tur_head.angles + spider.angles);
198 player.v_angle_x *= -1;
199 if(ad_x > 180) ad_x -= 360;
200 if(ad_x < -180) ad_x += 360;
201 if(ad_y > 180) ad_y -= 360;
202 if(ad_y < -180) ad_y += 360;
205 ftmp = autocvar_g_vehicle_spiderbot_head_turnspeed * sys_frametime;
206 ad_y = bound(-ftmp, ad_y, ftmp);
207 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);
210 #if 0 // Enable to pich by cross-trace (more precise in chase, but less predictable)
211 ad = vectoangles(normalize(trace_endpos - gettaginfo(spider.tur_head,gettagindex(spider.tur_head,"tag_hud")))) - (spider.tur_head.angles + spider.angles);
212 if(ad_x > 180) ad_x -= 360;
213 if(ad_x < -180) ad_x += 360;
215 ftmp = autocvar_g_vehicle_spiderbot_head_pitchspeed * sys_frametime;
216 ad_x = bound(ftmp * -1, ad_x, ftmp);
217 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);
220 ftmp = autocvar_g_vehicle_spiderbot_turnspeed * sys_frametime;
221 ftmp = bound(-ftmp, spider.tur_head.angles_y, ftmp);
223 makevectors(spider.angles + '-2 0 0' * spider.angles_x);
227 ofs = self.origin + v_up * 128;
228 te_lightning1(world, ofs, ofs + v_up * 32);
229 te_lightning1(world, ofs, ofs + v_right * 128);
230 te_lightning1(world, ofs, ofs + v_forward * 256);
233 movelib_groundalign4point(autocvar_g_vehicle_spiderbot_springlength, autocvar_g_vehicle_spiderbot_springup, autocvar_g_vehicle_spiderbot_springblend);
235 if(spider.flags & FL_ONGROUND)
237 if(spider.frame == 4 && self.tur_head.wait != 0)
239 sound (self, CHAN_TRIGGER, "vehicles/spiderbot_land.wav", VOL_VEHICLEENGINE, ATTN_NORM);
243 if(player.BUTTON_JUMP && self.tur_head.wait < time)
245 sound (self, CHAN_TRIGGER, "vehicles/spiderbot_jump.wav", VOL_VEHICLEENGINE, ATTN_NORM);
246 //dprint("spiderbot_jump:", ftos(soundlength("vehicles/spiderbot_jump.wav")), "\n");
249 self.tur_head.wait = time + 2;
250 player.BUTTON_JUMP = 0;
251 spider.velocity = v_forward * 700 + v_up * 600;
256 if(vlen(player.movement) == 0)
258 if(self.sound_nexttime < time || self.delay != 3)
261 self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_idle.wav");
262 //dprint("spiderbot_idle:", ftos(soundlength("vehicles/spiderbot_idle.wav")), "\n");
263 sound (self, CHAN_TRIGGER, "vehicles/spiderbot_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
265 movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
270 spider.angles_y = anglemods(spider.angles_y + ftmp);
271 spider.tur_head.angles_y -= ftmp;
273 if(player.movement_x != 0)
275 if(player.movement_x > 0)
277 player.movement_x = 1;
280 else if(player.movement_x < 0)
282 player.movement_x = -1;
285 player.movement_y = 0;
286 movelib_move_simple(normalize(v_forward * player.movement_x),autocvar_g_vehicle_spiderbot_speed_walk,autocvar_g_vehicle_spiderbot_movement_inertia);
288 if(self.sound_nexttime < time || self.delay != 1)
291 self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_walk.wav");
292 sound (self, CHAN_TRIGGER, "vehicles/spiderbot_walk.wav", VOL_VEHICLEENGINE, ATTN_NORM);
293 //dprint("spiderbot_walk:", ftos(soundlength("vehicles/spiderbot_walk.wav")), "\n");
296 else if(player.movement_y != 0)
298 if(player.movement_y < 0)
300 player.movement_y = -1;
303 else if(player.movement_y > 0)
305 player.movement_y = 1;
308 movelib_move_simple(normalize(v_right * player.movement_y),autocvar_g_vehicle_spiderbot_speed_strafe,autocvar_g_vehicle_spiderbot_movement_inertia);
309 if(self.sound_nexttime < time || self.delay != 2)
312 self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_strafe.wav");
313 sound (self, CHAN_TRIGGER, "vehicles/spiderbot_strafe.wav", VOL_VEHICLEENGINE, ATTN_NORM);
314 //dprint("spiderbot_strafe:", ftos(soundlength("vehicles/spiderbot_strafe.wav")), "\n");
321 self.angles_x = bound(-45, self.angles_x, 45);
322 self.angles_z = bound(-45, self.angles_z, 45);
324 if(player.BUTTON_ATCK)
327 if(spider.vehicle_ammo1 >= autocvar_g_vehicle_spiderbot_minigun_ammo_cost && spider.tur_head.attack_finished_single <= time)
331 spider.misc_bulletcounter += 1;
335 mod(spider.misc_bulletcounter, 2) ? gun = spider.gun1 : gun = spider.gun2;
336 v = gettaginfo(gun, gettagindex(gun, "barrels"));
337 v_forward = normalize(v_forward);
340 fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
341 autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_SBMINIGUN, 0);
343 sound (gun, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
344 trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
345 pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
349 spider.vehicle_ammo1 -= autocvar_g_vehicle_spiderbot_minigun_ammo_cost;
350 spider.tur_head.attack_finished_single = time + autocvar_g_vehicle_spiderbot_minigun_refire;
351 player.vehicle_ammo1 = (spider.vehicle_ammo1 / autocvar_g_vehicle_spiderbot_minigun_ammo_max) * 100;
355 vehicles_regen(cnt, vehicle_ammo1, autocvar_g_vehicle_spiderbot_minigun_ammo_max,
356 autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause,
357 autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime);
359 spiderbot_rocket_do();
361 if(self.vehicle_flags & VHF_SHIELDREGEN)
362 vehicles_regen(dmg_time, vehicle_shield, autocvar_g_vehicle_spiderbot_shield, autocvar_g_vehicle_spiderbot_shield_regen_pause, autocvar_g_vehicle_spiderbot_shield_regen, frametime);
364 if(self.vehicle_flags & VHF_HEALTHREGEN)
365 vehicles_regen(dmg_time, vehicle_health, autocvar_g_vehicle_spiderbot_health, autocvar_g_vehicle_spiderbot_health_regen_pause, autocvar_g_vehicle_spiderbot_health_regen, frametime);
367 player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0;
368 player.vehicle_ammo2 = spider.tur_head.frame;
370 if(spider.gun2.cnt <= time)
371 player.vehicle_reload2 = 100;
373 player.vehicle_reload2 = 100 - ((spider.gun2.cnt - time) / spider.attack_finished_single) * 100;
375 setorigin(player, spider.origin + '0 0 1' * SPIDERBOT_MAX_z);
376 player.velocity = spider.velocity;
378 VEHICLE_UPDATE_PLAYER(health, spiderbot);
380 if(self.vehicle_flags & VHF_HASSHIELD)
381 VEHICLE_UPDATE_PLAYER(shield, spiderbot);
383 #if 1 // 0 to enable per-gun impact aux crosshairs
384 // Avarage gun impact point's -> aux cross
386 ad = gettaginfo(spider.gun1, gettagindex(spider.gun1, "barrels"));
388 ad += gettaginfo(spider.gun2, gettagindex(spider.gun2, "barrels"));
391 v_forward = vf * 0.5;
392 traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, spider);
393 UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload1) + ('0 1 0' * (1 - player.vehicle_reload1)), 0);
396 ad = gettaginfo(spider.gun1, gettagindex(spider.gun1, "barrels"));
397 traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, spider);
398 UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload1) + ('0 1 0' * (1 - player.vehicle_reload1)), 0);
400 ad = gettaginfo(spider.gun2, gettagindex(spider.gun2, "barrels"));
401 traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, spider);
402 UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload1) + ('0 1 0' * (1 - player.vehicle_reload1)), 1);
409 void spiderbot_think()
411 if(self.flags & FL_ONGROUND)
412 movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
414 self.nextthink = time;
417 void spiderbot_enter()
420 self.movetype = MOVETYPE_WALK;
422 self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_spiderbot_health);
423 self.owner.vehicle_shield = (self.vehicle_shield / autocvar_g_vehicle_spiderbot_shield);
426 void spiderbot_exit(float eject)
431 e = findchain(classname,"spiderbot_rocket");
434 if(e.owner == self.owner)
436 e.realowner = self.owner;
442 self.velocity = '0 0 0';
443 self.think = spiderbot_think;
444 self.nextthink = time;
446 self.movetype = MOVETYPE_WALK;
451 makevectors(self.angles);
454 spot = self.origin + v_forward * 100 + '0 0 64';
455 spot = vehicles_findgoodexit(spot);
456 setorigin(self.owner , spot);
457 self.owner.velocity = (v_up + v_forward * 0.25) * 750;
461 spot = self.origin - v_forward * 200 + '0 0 64';
462 spot = vehicles_findgoodexit(spot);
463 setorigin(self.owner , spot);
469 void spiderbot_spawn()
472 self.tur_head.frame = 1;
473 self.think = spiderbot_think;
474 self.nextthink = time;
475 self.vehicle_health = autocvar_g_vehicle_spiderbot_health;
476 self.vehicle_shield = autocvar_g_vehicle_spiderbot_shield;
477 self.movetype = MOVETYPE_WALK;
478 self.solid = SOLID_SLIDEBOX;
479 self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = 1;
480 self.tur_head.angles = '0 0 0';
482 setorigin(self, self.pos1 + '0 0 128');
483 self.angles = self.pos2;
486 void spiderbot_headfade()
488 self.think = spiderbot_headfade;
489 self.nextthink = self.fade_time;
490 self.alpha = 1 - (time - self.fade_time) * self.fade_rate;
492 if(self.cnt < time || self.alpha < 0.1)
496 sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
497 pointparticles(particleeffectnum("explosion_big"), self.origin + '0 0 100', '0 0 0', 1);
503 void spiderbot_blowup()
509 sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
510 pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
512 self.nextthink = time + 0.1;
522 setmodel(b, "models/vehicles/spiderbot.dpm");
523 setmodel(h, "models/vehicles/spiderbot_top.dpm");
524 setmodel(g1, "models/vehicles/spiderbot_barrels.dpm");
525 setmodel(g2, "models/vehicles/spiderbot_barrels.dpm");
527 setorigin(b, self.origin);
529 b.angles = self.angles;
530 setsize(b, self.mins, self.maxs);
532 setorigin(h, gettaginfo(self, gettagindex(self, "tag_head")));
533 h.movetype = MOVETYPE_BOUNCE;
534 h.solid = SOLID_BBOX;
535 h.velocity = v_up * (500 + random() * 500) + randomvec() * 128;
536 h.modelflags = MF_ROCKET;
537 h.effects = EF_FLAME | EF_LOWPRECISION;
538 h.avelocity = randomvec() * 360;
541 h.cnt = time + (3.5 * random());
542 h.fade_rate = 1 / min(autocvar_g_vehicle_spiderbot_respawntime, 10);
544 h.think = spiderbot_headfade;
547 setorigin(g1, gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_hardpoint01")));
548 g1.movetype = MOVETYPE_TOSS;
549 g1.solid = SOLID_CORPSE;
550 g1.velocity = v_forward * 700 + (randomvec() * 32);
551 g1.avelocity = randomvec() * 180;
553 setorigin(g2, gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_hardpoint02")));
554 g2.movetype = MOVETYPE_TOSS;
555 g2.solid = SOLID_CORPSE;
556 g2.velocity = v_forward * 700 + (randomvec() * 32);
557 g2.avelocity = randomvec() * 180;
559 h.colormod = b.colormod = g1.colormod = g2.colormod = '-2 -2 -2';
561 SUB_SetFade(b, time + 5, min(autocvar_g_vehicle_spiderbot_respawntime, 1));
562 //SUB_SetFade(h, time, min(autocvar_g_vehicle_spiderbot_respawntime, 10));
563 SUB_SetFade(g1, time, min(autocvar_g_vehicle_spiderbot_respawntime, 10));
564 SUB_SetFade(g2, time, min(autocvar_g_vehicle_spiderbot_respawntime, 10));
566 RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_SBBLOWUP, world);
568 self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = -1;
569 self.movetype = MOVETYPE_NONE;
570 self.deadflag = DEAD_DEAD;
571 self.solid = SOLID_NOT;
572 self.tur_head.effects &~= EF_FLAME;
573 self.vehicle_hudmodel.viewmodelforclient = self;
578 sound (self, CHAN_TRIGGER, "vehicles/spiderbot_die.wav", VOL_BASE, ATTN_NORM);
579 pointparticles(particleeffectnum("explosion_medium"), self.origin + '0 0 100', '0 0 0', 1);
582 self.event_damage = SUB_Null;
583 self.takedamage = DAMAGE_NO;
584 self.touch = SUB_Null;
585 self.cnt = 3.4 + time + random() * 2;
586 self.think = spiderbot_blowup;
587 self.nextthink = time;
588 self.deadflag = DEAD_DYING;
590 self.tur_head.effects |= EF_FLAME;
591 self.colormod = self.tur_head.colormod = '-1 -1 -1';
593 self.movetype = MOVETYPE_TOSS;
596 void vewhicle_spiderbot_dinit()
598 if not (vehicle_initialize(
600 "models/vehicles/spiderbot.dpm",
601 "models/vehicles/spiderbot_top.dpm",
602 "models/vehicles/spiderbot_cockpit.dpm",
603 "tag_head", "tag_hud", "",
605 SPIDERBOT_MIN, SPIDERBOT_MAX,
607 spiderbot_spawn, autocvar_g_vehicle_spiderbot_respawntime,
609 spiderbot_enter, spiderbot_exit,
610 spiderbot_die, spiderbot_think,
621 setmodel(self.gun1, "models/vehicles/spiderbot_barrels.dpm");
622 setmodel(self.gun2, "models/vehicles/spiderbot_barrels.dpm");
624 setattachment(self.gun1, self.tur_head, "tag_hardpoint01");
625 setattachment(self.gun2, self.tur_head, "tag_hardpoint02");
631 void spawnfunc_vehicle_spiderbot()
633 precache_model ( "models/vhshield.md3");
634 precache_model ( "models/vehicles/spiderbot.dpm");
635 precache_model ( "models/vehicles/spiderbot_top.dpm");
636 precache_model ( "models/vehicles/spiderbot_barrels.dpm");
637 precache_model ( "models/vehicles/spiderbot_cockpit.dpm");
638 precache_model ( "models/uziflash.md3");
640 precache_sound ( "weapons/rocket_impact.wav" );
641 precache_sound ( "weapons/uzi_fire.wav" );
642 precache_sound ( "weapons/rocket_impact.wav");
644 precache_sound ( "vehicles/spiderbot_die.wav");
645 precache_sound ( "vehicles/spiderbot_idle.wav");
646 precache_sound ( "vehicles/spiderbot_jump.wav");
647 precache_sound ( "vehicles/spiderbot_strafe.wav");
648 precache_sound ( "vehicles/spiderbot_walk.wav");
649 precache_sound ( "vehicles/spiderbot_land.wav");
651 vehicles_configcheck("vehicle_spiderbot.cfg", autocvar_g_vehicle_spiderbot_health);
652 if(autocvar_g_vehicle_spiderbot_shield)
653 self.vehicle_flags |= VHF_HASSHIELD;
655 if(autocvar_g_vehicle_spiderbot_shield_regen)
656 self.vehicle_flags |= VHF_SHIELDREGEN;
658 if(autocvar_g_vehicle_spiderbot_health_regen)
659 self.vehicle_flags |= VHF_HEALTHREGEN;
661 self.think = vewhicle_spiderbot_dinit;
662 self.nextthink = time + (autocvar_g_vehicles_delayspawn ? autocvar_g_vehicle_spiderbot_respawntime + (random() * autocvar_g_vehicles_delayspawn_jitter) : 0.5);