1 void spawnfunc_turret_flac();
2 void turret_flac_dinit();
3 void turret_flac_attack();
4 void turret_flac_projectile_explode();
6 void turret_flac_attack()
10 turret_tag_fire_update();
12 sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
14 setorigin(proj, self.tur_shotorg);
15 setsize(proj, '0 0 0', '0 0 0');
16 proj.classname = "flac_projectile";
18 proj.bot_dodge = TRUE;
19 proj.bot_dodgerating = self.shot_dmg;
20 proj.solid = SOLID_BBOX;
21 proj.movetype = MOVETYPE_FLYMISSILE;
22 proj.flags = FL_PROJECTILE;
23 proj.takedamage = DAMAGE_NO;
24 proj.velocity = normalize(self.tur_shotdir_updated + randomvec() * self.shot_spread) * self.shot_speed;
25 proj.angles = vectoangles(proj.velocity);
26 proj.touch = turret_flac_projectile_explode;
27 proj.think = turret_flac_projectile_explode;
28 proj.nextthink = time + max(self.tur_impacttime,(self.shot_radius * 3) / self.shot_speed);
29 proj.enemy = self.enemy;
32 CSQCProjectile(proj, TRUE, PROJECTILE_HAGAR, TRUE);
34 self.tur_head.frame = self.tur_head.frame + 1;
35 if (self.tur_head.frame >= 4) self.tur_head.frame = 0;
39 void turret_flac_projectile_explode()
41 if( (self.enemy != world) &&
42 (vlen(self.origin - self.enemy.origin) < self.owner.shot_radius * 3) )
45 setorigin(self,self.enemy.origin + randomvec() * self.owner.shot_radius);
47 self.event_damage = SUB_Null;
51 ftmp = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET_FLAC, world);
52 self.owner.tur_dbg_dmg_t_h = self.owner.tur_dbg_dmg_t_h + ftmp; //self.owner.shot_dmg;
53 self.owner.tur_dbg_dmg_t_f = self.owner.tur_dbg_dmg_t_f + self.owner.shot_dmg;
55 RadiusDamage (self, self.owner, self.owner.shot_dmg, self.owner.shot_dmg * 0.5, self.owner.shot_radius, world, self.owner.shot_force, DEATH_TURRET_FLAC, world);
62 void turret_flac_dinit()
64 if (self.netname == "") self.netname = "FLAC Cannon";
66 self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_FASTPROJ | TFL_TURRCAPS_MISSILEKILL;
67 self.ammo_flags = TFL_AMMO_ROCKETS | TFL_AMMO_RECHARGE;
68 self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
70 if (turret_stdproc_init("flac_std", "models/turrets/base.md3", "models/turrets/flac.md3", TID_FLAC) == 0)
75 setsize(self.tur_head,'-32 -32 0','32 32 64');
77 self.damage_flags |= TFL_DMG_HEADSHAKE;
78 self.target_select_flags |= TFL_TARGETSELECT_NOTURRETS | TFL_TARGETSELECT_MISSILESONLY;
82 self.turret_firefunc = turret_flac_attack;
85 /*QUAKED turret_flac (0 .5 .8) ?
88 void spawnfunc_turret_flac()
90 precache_model ("models/turrets/base.md3");
91 precache_model ("models/turrets/flac.md3");
93 self.think = turret_flac_dinit;
94 self.nextthink = time + 0.5;